]> git.lizzy.rs Git - rust.git/commit
miri/CTFE refactor
authorRalf Jung <post@ralfj.de>
Mon, 13 Aug 2018 14:14:22 +0000 (16:14 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 22 Aug 2018 07:06:28 +0000 (09:06 +0200)
commitad2de8b4ee099916113b7b3577ac86857b1568be
treed646959a7529e9b5aa0d49f3b069f46eb0f8ae92
parent7d4f5f7974f75635c88af31013ae7cc0ed1927ef
miri/CTFE refactor

* Value gets renamed to Operand, so that now interpret::{Place, Operand} are the
  "dynamic" versions of mir::{Place, Operand}.
* Operand and Place share the data for their "stuff is in memory"-base in a new
  type, MemPlace.  This also makes it possible to give some more precise types
  in other areas.  Both Operand and MemPlace have methods available to project
  into fields (and other kinds of projections) without causing further
  allocations.
* The type for "a Scalar or a ScalarPair" is called Value, and again used to
  give some more precise types.
* All of these have versions with an attached layout, so that we can more often
  drag the layout along instead of recomputing it.  This lets us get rid of
  `PlaceExtra::Downcast`.  MPlaceTy and PlaceTy can only be constructed
  in place.rs, making sure the layout is handled properly.
  (The same should eventually be done for ValTy and OpTy.)
* All the high-level functions to write typed memory take a Place, and live in
  place.rs.  All the high-level typed functions to read typed memory take an
  Operand, and live in operands.rs.
31 files changed:
src/librustc/dep_graph/dep_node.rs
src/librustc/ich/impls_ty.rs
src/librustc/mir/interpret/mod.rs
src/librustc/mir/interpret/value.rs
src/librustc/mir/mod.rs
src/librustc/ty/query/config.rs
src/librustc/ty/query/mod.rs
src/librustc/ty/query/plumbing.rs
src/librustc/ty/sty.rs
src/librustc_codegen_llvm/debuginfo/metadata.rs
src/librustc_codegen_llvm/mir/constant.rs
src/librustc_lint/builtin.rs
src/librustc_mir/hair/cx/mod.rs
src/librustc_mir/hair/pattern/mod.rs
src/librustc_mir/interpret/cast.rs
src/librustc_mir/interpret/const_eval.rs
src/librustc_mir/interpret/eval_context.rs
src/librustc_mir/interpret/machine.rs
src/librustc_mir/interpret/memory.rs
src/librustc_mir/interpret/mod.rs
src/librustc_mir/interpret/operand.rs [new file with mode: 0644]
src/librustc_mir/interpret/operator.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/interpret/traits.rs
src/librustc_mir/interpret/value.rs [deleted file]
src/librustc_mir/lib.rs
src/librustc_mir/transform/const_prop.rs
src/librustc_typeck/check/mod.rs