doc: rewrite stale evalComptimeString comment (no shortcut still exists)
This commit is contained in:
@@ -6442,12 +6442,14 @@ pub const Lowering = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Case 2: Evaluate via IR interpreter, reusing the parent module.
|
// Case 2: Evaluate via IR interpreter, reusing the parent module.
|
||||||
// The parent module already has every protocol/struct/impl/thunk
|
// The parent's `scanDecls` pass has already registered every
|
||||||
// registered (Allocator, CAllocator, Context, the GPA/Tracker
|
// type / protocol / impl / thunk the comptime call may need
|
||||||
// thunks), so the interp can run the full protocol-dispatch
|
// (Allocator, CAllocator, Context, the per-impl thunks). A
|
||||||
// chain that codegen emits. A fresh ct_module would skip the
|
// fresh empty module would only lazy-lower function ASTs and
|
||||||
// scan pass and force every `context.allocator.X` call through
|
// would miss the type/protocol registrations, which would break
|
||||||
// a `matchContextAllocCall` shortcut to stay runnable.
|
// `context.allocator.X` — the protocol dispatch chain needs
|
||||||
|
// those types to resolve struct field layout and the alloc/
|
||||||
|
// dealloc thunks at the bottom of the dispatch.
|
||||||
const ct_func_id = self.createComptimeFunction("__insert", expr, .string);
|
const ct_func_id = self.createComptimeFunction("__insert", expr, .string);
|
||||||
|
|
||||||
var interp = interp_mod.Interpreter.init(self.module, self.alloc);
|
var interp = interp_mod.Interpreter.init(self.module, self.alloc);
|
||||||
|
|||||||
Reference in New Issue
Block a user