]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #1492 - RalfJung:rustup, r=RalfJung
authorbors <bors@rust-lang.org>
Thu, 30 Jul 2020 16:32:53 +0000 (16:32 +0000)
committerbors <bors@rust-lang.org>
Thu, 30 Jul 2020 16:32:53 +0000 (16:32 +0000)
Rustup

Adjusting for @oli-obk' log changes.

While at it I also removed the `*_of_val` intrinsics that got moved to rustc (Cc @ecstatic-morse).

rust-version
src/diagnostics.rs
src/shims/foreign_items.rs
src/shims/intrinsics.rs
src/shims/posix/macos/dlsym.rs
src/shims/windows/dlsym.rs

index 1ba022ac969404595d1cee390324e5835bea8a71..0765203ccbc3fbc70c7ffc18404cabc1ea242105 100644 (file)
@@ -1 +1 @@
-1454bbd4fdac9b7272b93fe82860613dccc0afad
+21867225a74d3b07c2b65e32c67f45197db36896
index 1b41ba441837764dde05b36bc155edeaf9428267..a20e8126c13aeb0619111afa9006cd1625bdce4c 100644 (file)
@@ -137,8 +137,7 @@ pub fn report_error<'tcx, 'mir>(
                 access.uninit_ptr.offset.bytes(),
                 access.uninit_ptr.offset.bytes() + access.uninit_size.bytes(),
             );
-            ecx.memory.dump_alloc(access.uninit_ptr.alloc_id);
-            eprintln!();
+            eprintln!("{:?}", ecx.memory.dump_alloc(access.uninit_ptr.alloc_id));
         }
         _ => {}
     }
index 98e66db92da3c1d17d5956b6f28cde6029aad9ef..0379ec0c07787501064e6b12ff58d08ccf56d07d 100644 (file)
@@ -1,5 +1,7 @@
 use std::{convert::{TryInto, TryFrom}, iter};
 
+use log::trace;
+
 use rustc_hir::def_id::DefId;
 use rustc_middle::{mir, ty};
 use rustc_target::abi::{Align, Size};
@@ -175,7 +177,7 @@ fn emulate_foreign_item(
 
         // Third: functions that return.
         if this.emulate_foreign_item_by_name(link_name, args, dest, ret)? {
-            this.dump_place(*dest);
+            trace!("{:?}", this.dump_place(*dest));
             this.go_to_block(ret);
         }
 
index ee64b1ffca44b77b27785919e32be1c14660943e..53d4d08eba0dc899cf58ba9c12c46da7860ce723 100644 (file)
@@ -1,5 +1,7 @@
 use std::iter;
 
+use log::trace;
+
 use rustc_attr as attr;
 use rustc_ast::ast::FloatTy;
 use rustc_middle::{mir, ty};
@@ -482,24 +484,6 @@ fn call_intrinsic(
                 }
             }
 
-            "min_align_of_val" => {
-                let &[mplace] = check_arg_count(args)?;
-                let mplace = this.deref_operand(mplace)?;
-                let (_, align) = this
-                    .size_and_align_of_mplace(mplace)?
-                    .expect("size_of_val called on extern type");
-                this.write_scalar(Scalar::from_machine_usize(align.bytes(), this), dest)?;
-            }
-
-            "size_of_val" => {
-                let &[mplace] = check_arg_count(args)?;
-                let mplace = this.deref_operand(mplace)?;
-                let (size, _) = this
-                    .size_and_align_of_mplace(mplace)?
-                    .expect("size_of_val called on extern type");
-                this.write_scalar(Scalar::from_machine_usize(size.bytes(), this), dest)?;
-            }
-
             // Other
             "assume" => {
                 let &[cond] = check_arg_count(args)?;
@@ -524,7 +508,7 @@ fn call_intrinsic(
             name => throw_unsup_format!("unimplemented intrinsic: {}", name),
         }
 
-        this.dump_place(*dest);
+        trace!("{:?}", this.dump_place(*dest));
         this.go_to_block(ret);
         Ok(())
     }
index 0236b10e5fc8ece347bb52b0baca1080f5f6954f..c9f57090ff8a244951a032f1ff2cc37e8f019ba0 100644 (file)
@@ -1,5 +1,7 @@
 use rustc_middle::mir;
 
+use log::trace;
+
 use crate::*;
 use helpers::check_arg_count;
 
@@ -42,7 +44,7 @@ fn call_dlsym(
             }
         }
 
-        this.dump_place(*dest);
+        trace!("{:?}", this.dump_place(*dest));
         this.go_to_block(ret);
         Ok(())
     }
index 737fd4314f632cc33e360b392d90112ec9a6a5d0..91bfedff8db682870fe343c4120279f35613bf94 100644 (file)
@@ -1,5 +1,7 @@
 use rustc_middle::mir;
 
+use log::trace;
+
 use crate::*;
 use helpers::check_arg_count;
 use shims::windows::sync::EvalContextExt as _;
@@ -73,7 +75,7 @@ fn call_dlsym(
             }
         }
 
-        this.dump_place(*dest);
+        trace!("{:?}", this.dump_place(*dest));
         this.go_to_block(ret);
         Ok(())
     }