Pinned operand.rs::const_val_to_op and eval_context.rs::eval_mir_constant, including operand.rs's current-frame normalization boundary. Compiler query results are reusable exact-key evidence; no Rust trait or constant solver is implemented here. Global root conversion retains memory.rs classification and its TLS/extern distinction. Required machine hooks remain stateful and fallible.
- metadata (message : String) : ConstantError
- query (message : String) : ConstantError
- scalar (error : Memory.ScalarError) : ConstantError
- immediate (error : ImmediateError) : ConstantError
- globalAccess (error : Memory.GlobalAccessError) : ConstantError
- memoryAccess (error : Memory.MemoryAccessError) : ConstantError
- tlsConstantPointer (id : Memory.AllocId) : ConstantError
- invariant (message : String) : ConstantError
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
- memory : Memory.MemoryState P E K
- hooks : H
- currentInstance : CallInstance
Instances For
Initialize the subsystem view from the actual current stack frame, retaining its instance kind and complete generic arguments.
Equations
- Miri.Interpreter.ConstantState.fromFrame memory hooks frame = { memory := memory, hooks := hooks, currentInstance := frame.functionInstance }
Instances For
Equations
- Miri.Interpreter.ConstantM P E K H A = EStateM Miri.Interpreter.ConstantError (Miri.Interpreter.ConstantState P E K H) A
Instances For
Source ConstValue conversion needs only allocation root/extern queries; normalization and Const::eval belong to the separate MIR-constant path.
- adjustGlobalRootPointer : Memory.Pointer Memory.CtfeProvenance → ConstantM P E K H (Memory.Pointer P)
- externStaticPointer : MIR.DefId → ConstantM P E K H (Memory.Pointer P)
Instances For
- instantiateAndNormalize : CallInstance → MIR.MirConst → ConstantM P E K H MIR.MirConst
Source instantiate_from_current_frame_and_normalize_erasing_regions. The full current InstanceArgs and shared compiler tables must be used.
- evaluate : CallInstance → MIR.MirConst → MIR.SpanRef → ConstantM P E K H MIR.ConstValue
Source Const::eval. Receives the normalized source constant and span; absent/TooGeneric/failed compiler evidence is an error, not a value.
- adjustGlobalRootPointer : Memory.Pointer Memory.CtfeProvenance → ConstantM P E K H (Memory.Pointer P)
Source M::adjust_alloc_root_pointer; implements machine provenance, address allocation, borrow tags and all required global-pointer effects.
- externStaticPointer : MIR.DefId → ConstantM P E K H (Memory.Pointer P)
Source M::extern_static_pointer; the argument is the shared dense DefId.
Instances For
Equations
- queries.valueQueries = { adjustGlobalRootPointer := queries.adjustGlobalRootPointer, externStaticPointer := queries.externStaticPointer }
Instances For
- fnInstance : CallInstance
- original : MIR.MirConst
- normalized : MIR.MirConst
- span : MIR.SpanRef
- value : MIR.ConstValue
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Exact compiler query reuse. This checks instance arguments, source form, normalized form and span; it never substitutes a result from another instance.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source global_root_pointer classification happens before the machine root pointer adjustment. Constants cannot point to TLS; foreign statics require the extern-static hook instead of normal root adjustment.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source const_val_to_op. Indirect and slice constants carry immutable/shared CTFE roots; scalar pointers retain their own exported flags. Constructing an indirect operand does not dereference it or trigger a global initializer.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compatibility projection for the full MIR-constant dictionary.
Equations
- Miri.Interpreter.constantGlobalRootPointer queries pointer = Miri.Interpreter.valueGlobalRootPointer queries.valueQueries pointer
Instances For
Equations
- Miri.Interpreter.constValueToOpWithLayout runtime queries value ty known checkKnown = Miri.Interpreter.valueToOpWithLayout runtime queries.valueQueries value ty known checkKnown
Instances For
The evaluator receives the original source form through normalization; only source Const::Val bypasses a compiler evaluation query.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Connected eval_operand(Constant): instantiate/substitute current frame arguments, normalize, then evaluate; no missing parameter becomes a default.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compatibility entry points without a known-layout hint.
Equations
- Miri.Interpreter.constValueToOp runtime queries value ty = Miri.Interpreter.constValueToOpWithLayout runtime queries value ty none none
Instances For
Equations
- Miri.Interpreter.evalMirConstant runtime queries constant span = Miri.Interpreter.evalMirConstantWithLayout runtime queries constant span none none
Instances For
Equations
- Miri.Interpreter.evalConstOperand runtime queries constant = Miri.Interpreter.evalConstOperandWithLayout runtime queries constant none none
Instances For
Connect subsequent memory access to source get_global_alloc/get_alloc_raw including initializer→before_access_global→adjust hooks and owned-only caching.
Equations
- One or more equations did not get rendered due to their size.