P5.7 Step B2: remove the #compiler attribute + compiler_expr AST node
The #compiler struct attribute + #compiler-suffixed bodyless methods were fully superseded by abi(.compiler) (P5.5) — no sx code uses them. Remove the hash_compiler token (token/lexer/lsp), the is_compiler_struct / struct_default_compiler parser machinery + the two compiler_expr body- synthesis branches, the compiler_expr AST variant, and every .builtin_expr/.compiler_expr switch arm + == .compiler_expr check across sema/resolver/semantic_diagnostics/generic/decl/call/calls (kept .builtin_expr). abi(.compiler) is untouched. Delete the obsolete calls.test.zig dispatch test. 500/500 unit + 706/0 corpus.
This commit is contained in:
@@ -431,6 +431,23 @@ when reached (sentinels or accessor fns; see the design doc Risks).
|
||||
`List` growth; orthogonal, see `current/CHECKPOINT-METATYPE.md`.)
|
||||
|
||||
## Log
|
||||
- **P5.7 Step B — deleted the `#compiler`/`compiler_call`/hook-Registry mechanism end-to-end (2026-06-19).**
|
||||
All superseded by `abi(.compiler)` VM-native dispatch (P5.5) — no sx code emits any of it. Two green commits:
|
||||
**B1** (`e2971f2`) removed the `compiler_call` IR op: the op variant + `CompilerCall` struct (`inst.zig`), the
|
||||
`Builder.compilerCall` emitter (`module.zig`), the two dead producer blocks in `lower/call.zig` (the
|
||||
`compiler_expr`-bodied free-fn + method dispatch), every consumer arm (`emit_llvm`, `ops.emitCompilerCall`,
|
||||
`print`, the `interp.zig` hook-dispatch arm), and the `interp.hooks` field + init/deinit. Stripped
|
||||
`compiler_hooks.zig` to its still-live `BuildConfig` / `BuildHooks` (link/emit vtable, P5.2b) / `AssetDir` —
|
||||
deleted `HookError`/`HookFn`/`Registry`/`registerDefaults` + all 37 `hookXxx` fns + the now-unused
|
||||
`interp`/`Value` imports. The two VM unit tests that used `compiler_call` as a sample unported op now use
|
||||
`vec_splat`. **B2** removed the `#compiler` attribute + `compiler_expr` AST node: the `hash_compiler` token
|
||||
(`token.zig`/`lexer.zig`/`lsp/server.zig`), the `is_compiler_struct` / `struct_default_compiler` parser
|
||||
machinery + the two `compiler_expr` body-synthesis branches (`parser.zig`), the `compiler_expr: void` AST
|
||||
variant (`ast.zig`), and every `.builtin_expr, .compiler_expr =>` arm / `== .compiler_expr` check across
|
||||
sema/resolver/semantic_diagnostics/generic/decl/call/calls (dropped `.compiler_expr`, kept `.builtin_expr`).
|
||||
`abi(.compiler)` (the NEW mechanism) is untouched. Deleted the obsolete `calls.test.zig` `#compiler`-dispatch
|
||||
unit test. **500/500 unit (−1 obsolete test) + 706/0 corpus, no snapshot churn.** NEXT: Step C — delete
|
||||
`interp.zig` + the `regToValue`/`valueToReg` bridge; move `#insert` (`evalComptimeString`) to the VM.
|
||||
- **P5.7 Step A — the flip: VM is the SOLE comptime evaluator at the emit-time + type-fn sites; NO fallback
|
||||
(2026-06-19).** Removed the `if (self.comptime_flat or need_vm)` gate + the `vm_result orelse fallback`
|
||||
legacy-interp blocks from `emit_llvm.zig` (`runComptimeSideEffects` AND the const-init path in `emitGlobals`)
|
||||
|
||||
Reference in New Issue
Block a user