Skip to content

Commit 55bdb31

Browse files
committed
Auto merge of #1492 - RalfJung:rustup, r=RalfJung
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).
2 parents 720c2bf + 2dfde5b commit 55bdb31

File tree

6 files changed

+14
-25
lines changed

6 files changed

+14
-25
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1454bbd4fdac9b7272b93fe82860613dccc0afad
1+
21867225a74d3b07c2b65e32c67f45197db36896

src/diagnostics.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ pub fn report_error<'tcx, 'mir>(
137137
access.uninit_ptr.offset.bytes(),
138138
access.uninit_ptr.offset.bytes() + access.uninit_size.bytes(),
139139
);
140-
ecx.memory.dump_alloc(access.uninit_ptr.alloc_id);
141-
eprintln!();
140+
eprintln!("{:?}", ecx.memory.dump_alloc(access.uninit_ptr.alloc_id));
142141
}
143142
_ => {}
144143
}

src/shims/foreign_items.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use std::{convert::{TryInto, TryFrom}, iter};
22

3+
use log::trace;
4+
35
use rustc_hir::def_id::DefId;
46
use rustc_middle::{mir, ty};
57
use rustc_target::abi::{Align, Size};
@@ -175,7 +177,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
175177

176178
// Third: functions that return.
177179
if this.emulate_foreign_item_by_name(link_name, args, dest, ret)? {
178-
this.dump_place(*dest);
180+
trace!("{:?}", this.dump_place(*dest));
179181
this.go_to_block(ret);
180182
}
181183

src/shims/intrinsics.rs

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use std::iter;
22

3+
use log::trace;
4+
35
use rustc_attr as attr;
46
use rustc_ast::ast::FloatTy;
57
use rustc_middle::{mir, ty};
@@ -482,24 +484,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
482484
}
483485
}
484486

485-
"min_align_of_val" => {
486-
let &[mplace] = check_arg_count(args)?;
487-
let mplace = this.deref_operand(mplace)?;
488-
let (_, align) = this
489-
.size_and_align_of_mplace(mplace)?
490-
.expect("size_of_val called on extern type");
491-
this.write_scalar(Scalar::from_machine_usize(align.bytes(), this), dest)?;
492-
}
493-
494-
"size_of_val" => {
495-
let &[mplace] = check_arg_count(args)?;
496-
let mplace = this.deref_operand(mplace)?;
497-
let (size, _) = this
498-
.size_and_align_of_mplace(mplace)?
499-
.expect("size_of_val called on extern type");
500-
this.write_scalar(Scalar::from_machine_usize(size.bytes(), this), dest)?;
501-
}
502-
503487
// Other
504488
"assume" => {
505489
let &[cond] = check_arg_count(args)?;
@@ -524,7 +508,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
524508
name => throw_unsup_format!("unimplemented intrinsic: {}", name),
525509
}
526510

527-
this.dump_place(*dest);
511+
trace!("{:?}", this.dump_place(*dest));
528512
this.go_to_block(ret);
529513
Ok(())
530514
}

src/shims/posix/macos/dlsym.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use rustc_middle::mir;
22

3+
use log::trace;
4+
35
use crate::*;
46
use helpers::check_arg_count;
57

@@ -42,7 +44,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
4244
}
4345
}
4446

45-
this.dump_place(*dest);
47+
trace!("{:?}", this.dump_place(*dest));
4648
this.go_to_block(ret);
4749
Ok(())
4850
}

src/shims/windows/dlsym.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use rustc_middle::mir;
22

3+
use log::trace;
4+
35
use crate::*;
46
use helpers::check_arg_count;
57
use shims::windows::sync::EvalContextExt as _;
@@ -73,7 +75,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
7375
}
7476
}
7577

76-
this.dump_place(*dest);
78+
trace!("{:?}", this.dump_place(*dest));
7779
this.go_to_block(ret);
7880
Ok(())
7981
}

0 commit comments

Comments
 (0)