Miri's caller-location intrinsic interns the compiler ConstValue, but Miri imports the resulting global afresh on each intrinsic evaluation. This adapter preserves the immutable CTFE allocation graph and only creates a new runtime global identity/root; it deliberately does not materialize/read the template through guest memory.
def
Miri.Input.EvalCallerLocationConstruction.hook
{K User Other : Type}
{C : Sort u_1}
(p : CompilerProviders.Prepared)
(functions : Interpreter.FunctionPointers.Hooks K User Other)
(currentLocation : Interpreter.MachineHooks.M K User MIR.SpanRef)
(pointee : MIR.TyId → Except String (Option MIR.TyId))
(classifyError : Interpreter.ConstantError → Interpreter.StepError)
(checkKnown : Interpreter.LocalLayout → Interpreter.LocalLayout → Interpreter.MachineHooks.M K User Bool)
:
C → (destination : Interpreter.LocalLayout) → Interpreter.MachineHooks.M K User (Interpreter.OpTy Memory.Provenance)
Equations
- One or more equations did not get rendered due to their size.