P5.7 Step D: delete dead .define builtin arm, defineFromInfo, decodeTypeSlice

Now that define() is sx over register_type, remove the bespoke metatype define
surface from the comptime VM: the .define callBuiltinVm arm, the defineFromInfo
helper (kind-branching minting), and decodeTypeSlice (its only caller). Remove the
BuiltinId.define enum member. The .declare/.define interceptions in lowering and
their BuiltinIds are now gone; only type_info/field_type remain as metatype
builtins. register_type/decodeMemberSlice stay (shared by the sx define and the
compiler-API graph builder).
This commit is contained in:
agra
2026-06-19 21:14:05 +03:00
parent 7b1d8ceb83
commit ccba704378
3 changed files with 13 additions and 138 deletions

View File

@@ -452,15 +452,9 @@ pub const BuiltinId = enum(u16) {
type_eq,
type_is_unsigned,
has_impl,
// The comptime type-CONSTRUCTION terminator builtin. Higher-level
// constructors (one-shot, channel-result, etc.) are ordinary sx built over
// it — the compiler knows none of them by name. Comptime-only (the comptime
// VM mutates the type table); reaching it at runtime / emit is a hard error.
// (`declare` is no longer a builtin — it's plain sx over the `declare_type`
// compiler-API primitive in `modules/std/meta.sx`.)
// define(handle, info) → decode the `TypeInfo` VALUE (the name travels in
// it) and complete the slot.
define,
// (`declare` and `define` are no longer builtins — they're plain sx over the
// `declare_type` / `register_type` compiler-API primitives in
// `modules/std/meta.sx`.)
// The comptime reflection INVERSE of `define`: read a type's variants
// (name + payload type) out of the type table and CONSTRUCT the same
// `.enum(EnumInfo{ variants })` value `define` decodes. Comptime-only