Create header files and minimal .c stubs for the Sema pipeline: - intern_pool.h/c: InternPool types, pre-interned indices (0-123), SimpleType/SimpleValue enums, Key tagged union, init/deinit - air.h/c: AIR instruction tags (X-macro), Ref encoding (MSB tag), InstData union, extra payload structs, init/deinit - type.h/c: TypeIndex typedef, stub query functions - value.h/c: ValueIndex typedef, conversion functions - sema.h/c: Sema/Block/InstMap/Merges structs, init/deinit/analyze stubs Wire up build.zig and integrate sema step into zig0.c pipeline. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 lines
298 B
C
10 lines
298 B
C
#include "value.h"
|
|
|
|
TypeIndex valueToType(ValueIndex val) {
|
|
// In InternPool, type indices and value indices share the same namespace.
|
|
// A value that represents a type simply contains the type index.
|
|
return val;
|
|
}
|
|
|
|
ValueIndex valueFromInterned(InternPoolIndex index) { return index; }
|