]> git.lizzy.rs Git - rust.git/commit
Miri Memory Work
authorRalf Jung <post@ralfj.de>
Thu, 23 Aug 2018 17:04:33 +0000 (19:04 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 27 Aug 2018 16:12:49 +0000 (18:12 +0200)
commitc141ccf158d8c660ef20a51104b701b4eb37822b
tree1e27be9f8ec89be350ca2423a7c3e8a5762e1400
parentb638d8c75f4e38c75c5caa52b10b18a350431687
Miri Memory Work

* Unify the two maps in memory to store the allocation and its kind together.
* Share the handling of statics between CTFE and miri: The miri engine always
  uses "lazy" `AllocType::Static` when encountering a static.  Acessing that
  static invokes CTFE (no matter the machine).  The machine only has any
  influence when writing to a static, which CTFE outright rejects (but miri
  makes a copy-on-write).
* Add an `AllocId` to by-ref consts so miri can use them as operands without
  making copies.
* Move responsibilities around for the `eval_fn_call` machine hook: The hook
  just has to find the MIR (or entirely take care of everything); pushing the
  new stack frame is taken care of by the miri engine.
* Expose the intrinsics and lang items implemented by CTFE so miri does not
  have to reimplement them.
20 files changed:
src/librustc/ich/impls_ty.rs
src/librustc/mir/interpret/mod.rs
src/librustc/mir/interpret/value.rs
src/librustc/ty/context.rs
src/librustc/ty/structural_impls.rs
src/librustc_codegen_llvm/mir/constant.rs
src/librustc_codegen_llvm/mir/operand.rs
src/librustc_codegen_llvm/mir/place.rs
src/librustc_mir/interpret/const_eval.rs
src/librustc_mir/interpret/eval_context.rs
src/librustc_mir/interpret/intrinsics.rs [new file with mode: 0644]
src/librustc_mir/interpret/machine.rs
src/librustc_mir/interpret/memory.rs
src/librustc_mir/interpret/mod.rs
src/librustc_mir/interpret/operand.rs
src/librustc_mir/interpret/place.rs
src/librustc_mir/interpret/step.rs
src/librustc_mir/interpret/terminator/drop.rs
src/librustc_mir/interpret/terminator/mod.rs
src/librustc_mir/monomorphize/collector.rs