about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/const_eval
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-07-02 16:24:42 -0400
committerRalf Jung <post@ralfj.de>2022-07-06 14:03:20 -0400
commit8ef0caa23ca31ccc8ef3769a0aeb35bea15532a6 (patch)
treec862d0cfbbc015b1fb7740d6fbf205c3aa929374 /compiler/rustc_const_eval/src/const_eval
parent049308cf8b48e9d67e54d6d0b01c10c79d1efc3a (diff)
downloadrust-8ef0caa23ca31ccc8ef3769a0aeb35bea15532a6.tar.gz
rust-8ef0caa23ca31ccc8ef3769a0aeb35bea15532a6.zip
interpret: remove LocalValue::Unallocated, add Operand::Uninit
Operand::Uninit is an *allocated* operand that is fully uninitialized.
This lets us lazily allocate the actual backing store of *all* locals (no matter their ABI).

I also reordered things in pop_stack_frame at the same time.
I should probably have made that a separate commit...
Diffstat (limited to 'compiler/rustc_const_eval/src/const_eval')
-rw-r--r--compiler/rustc_const_eval/src/const_eval/eval_queries.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs
index 0dac4f8978e..f84dd9521ee 100644
--- a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs
+++ b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs
@@ -189,6 +189,7 @@ pub(super) fn op_to_const<'tcx>(
                 let len: usize = len.try_into().unwrap();
                 ConstValue::Slice { data, start, end: start + len }
             }
+            Immediate::Uninit => to_const_value(&op.assert_mem_place()),
         },
     }
 }