Skip to main content

Module compiled

Module compiled 

Source
Expand description

Compiled expressions — PG’s ExprState idea (cut 30, extracted from eval.rs; v7.32 perf knife D / architecture v2 P1).

Walk the tree ONCE per query, pre-resolve column positions and collation-fold decisions (both row-invariant), emit a flat post-order step program; per-row evaluation is a linear loop — no tree dispatch, no name resolution, no collation lookups. Anything the compiler doesn’t model becomes a Step::Subtree that calls the interpreter for that node, so values AND error behaviour stay bit-for-bit with eval_expr (invariant I3).

Statics§

STEP_VM_BINARY_FIRE
STEP_VM_CALL_COUNT
v7.37.9 Phase 1A-ext-2 T1 — Step VM internal step-type counters. Read-only diagnostic; gates no behaviour. Used by counter_dump.rs to ground-truth subtree CSE / column-ref-push / multi-spec-combine attack ROI estimates.
STEP_VM_CASE_FIRE
STEP_VM_CAST_FIRE
STEP_VM_COLUMN_FIRE
STEP_VM_COLUMN_HEAP_ALLOC
v7.37.9 Round 3 — heap-alloc counters specifically for the T3 structural attack’s ROI estimate. Step::Column / Step::Lit hits pay a String alloc when the cell variant is heap-bearing (Text/Bytes/Json/Vector). T3 stack-lifetime push-by-borrow would eliminate these for the bulk of per-row work.
STEP_VM_FASTPRED_FIRE
v7.39 (round 481) — how many values the stack still holds when a call finishes, and how many are heap-bearing.
STEP_VM_FUNCTION_FIRE
STEP_VM_LIT_FIRE
STEP_VM_LIT_HEAP_ALLOC
STEP_VM_STACK_LEFTOVER
STEP_VM_STACK_LEFTOVER_HEAP
STEP_VM_STEPS_TOTAL