mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
no alignment check during interning
This commit is contained in:
parent
983f4daddf
commit
b85178a5fc
@ -74,7 +74,9 @@ fn eval_body_using_ecx<'mir, 'tcx>(
|
||||
None => InternKind::Constant,
|
||||
}
|
||||
};
|
||||
ecx.machine.check_alignment = false; // interning doesn't need to respect alignment
|
||||
intern_const_alloc_recursive(ecx, intern_kind, &ret)?;
|
||||
// we leave alignment checks off, since this `ecx` will not be used for further evaluation anyway
|
||||
|
||||
debug!("eval_body_using_ecx done: {:?}", *ret);
|
||||
Ok(ret)
|
||||
|
@ -89,10 +89,10 @@ pub struct CompileTimeInterpreter<'mir, 'tcx> {
|
||||
/// exhaustion error.
|
||||
///
|
||||
/// Setting this to `0` disables the limit and allows the interpreter to run forever.
|
||||
pub steps_remaining: usize,
|
||||
pub(super) steps_remaining: usize,
|
||||
|
||||
/// The virtual call stack.
|
||||
pub(crate) stack: Vec<Frame<'mir, 'tcx, AllocId, ()>>,
|
||||
pub(super) stack: Vec<Frame<'mir, 'tcx, AllocId, ()>>,
|
||||
|
||||
/// We need to make sure consts never point to anything mutable, even recursively. That is
|
||||
/// relied on for pattern matching on consts with references.
|
||||
@ -103,7 +103,7 @@ pub struct CompileTimeInterpreter<'mir, 'tcx> {
|
||||
pub(super) can_access_statics: bool,
|
||||
|
||||
/// Whether to check alignment during evaluation.
|
||||
check_alignment: bool,
|
||||
pub(super) check_alignment: bool,
|
||||
}
|
||||
|
||||
impl<'mir, 'tcx> CompileTimeInterpreter<'mir, 'tcx> {
|
||||
|
Loading…
Reference in New Issue
Block a user