File changed.
Preview size limit exceeded, changes collapsed.
Loading
Collect the inputs, derived pointers, and mutable evaluation state of DWARFExpression::Evaluate into a file-local EvalContext struct passed by reference to the static helpers. Two incidental fixes making this not-quite NFC: 1. Evaluate_DW_OP_deref_size renamed to Evaluate_DW_OP_deref and takes the LocationAtom, so error messages name the actual opcode. 2. ResolveLoadAddress no longer crashes on null exe_ctx (uses eval_ctx.target, which is null-safe). I initially prototyped a visitor-like design, centered around a DWARFEvaluator class with one method per opcode and shared state as members. I discarded it because moving the simple operations out of the switch hurt readability and increased mental overhead. Its only real benefit were the cleaner signatures, which this patch achives by using the new EvalContext.
File changed.
Preview size limit exceeded, changes collapsed.