Documentation

Miri.Interpreter.Constant

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.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Instances For
        def Miri.Interpreter.ConstantState.fromFrame {P E K H L F : Type} (memory : Memory.MemoryState P E K) (hooks : H) (frame : Frame P L F) :

        Initialize the subsystem view from the actual current stack frame, retaining its instance kind and complete generic arguments.

        Equations
        Instances For
          @[reducible, inline]
          abbrev Miri.Interpreter.ConstantM (P E K H A : Type) :
          Equations
          Instances For

            Source ConstValue conversion needs only allocation root/extern queries; normalization and Const::eval belong to the separate MIR-constant path.

            Instances For
              Instances For
                Equations
                Instances For
                  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
                            def Miri.Interpreter.valueToOpWithLayout {P E K H : Type} (runtime : Input.RuntimeMetadata) (queries : ConstantValueQueries P E K H) (value : MIR.ConstValue) (ty : MIR.TyId) (known : Option LocalLayout) (checkKnown : Option (LocalLayout → LocalLayout → ConstantM P E K H Bool)) :
                            ConstantM P E K H (OpTy P)

                            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
                              Instances For
                                def Miri.Interpreter.constValueToOpWithLayout {P E K H : Type} (runtime : Input.RuntimeMetadata) (queries : ConstantQueries P E K H) (value : MIR.ConstValue) (ty : MIR.TyId) (known : Option LocalLayout) (checkKnown : Option (LocalLayout → LocalLayout → ConstantM P E K H Bool)) :
                                ConstantM P E K H (OpTy P)
                                Equations
                                Instances For
                                  def Miri.Interpreter.evalMirConstantWithLayout {P E K H : Type} (runtime : Input.RuntimeMetadata) (queries : ConstantQueries P E K H) (constant : MIR.MirConst) (span : MIR.SpanRef) (known : Option LocalLayout) (checkKnown : Option (LocalLayout → LocalLayout → ConstantM P E K H Bool)) :
                                  ConstantM P E K H (OpTy P)

                                  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
                                    def Miri.Interpreter.evalConstOperandWithLayout {P E K H : Type} (runtime : Input.RuntimeMetadata) (queries : ConstantQueries P E K H) (constant : MIR.ConstOperand) (known : Option LocalLayout) (checkKnown : Option (LocalLayout → LocalLayout → ConstantM P E K H Bool)) :
                                    ConstantM P E K H (OpTy P)

                                    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
                                      def Miri.Interpreter.constValueToOp {P E K H : Type} (runtime : Input.RuntimeMetadata) (queries : ConstantQueries P E K H) (value : MIR.ConstValue) (ty : MIR.TyId) :
                                      ConstantM P E K H (OpTy P)

                                      Compatibility entry points without a known-layout hint.

                                      Equations
                                      Instances For
                                        def Miri.Interpreter.evalMirConstant {P E K H : Type} (runtime : Input.RuntimeMetadata) (queries : ConstantQueries P E K H) (constant : MIR.MirConst) (span : MIR.SpanRef) :
                                        ConstantM P E K H (OpTy P)
                                        Equations
                                        Instances For
                                          def Miri.Interpreter.evalConstOperand {P E K H : Type} (runtime : Input.RuntimeMetadata) (queries : ConstantQueries P E K H) (constant : MIR.ConstOperand) :
                                          ConstantM P E K H (OpTy P)
                                          Equations
                                          Instances For
                                            def Miri.Interpreter.constantGetAllocRaw {K P E H : Type} [DecidableEq K] (id : Memory.AllocId) (globalKind : Option K) (hooks : Memory.GlobalAllocationHooks P E K H) :

                                            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.
                                            Instances For