refactor(ffi-linkage): Phase 9.1c — delete dead VarDecl legacy foreign fields
VarDecl carried BOTH the legacy is_foreign/foreign_lib/foreign_name AND the new is_extern/extern_lib/extern_name (parallel forms coalesced during the migration). The global #foreign parse path now rejects, so the legacy trio is write-dead and read in only 3 coalescing sites (decl.zig). Simplified those readers (vd.extern_name orelse vd.name; vd.is_extern) and deleted the dead fields. Build confirms no other setter/reader. Snapshot-neutral; suite green (646/444). Remaining linkage (9.1): foreign_expr (25, still built by c_import.zig auto-synth) + ForeignClassDecl.is_foreign (runtime-class, → 9.2). Runtime-class family (9.2, Decision 5) is the big remaining src/ rename.
This commit is contained in:
10
src/ast.zig
10
src/ast.zig
@@ -361,16 +361,10 @@ pub const VarDecl = struct {
|
||||
name_span: Span,
|
||||
type_annotation: ?*Node,
|
||||
value: ?*Node,
|
||||
is_foreign: bool = false,
|
||||
foreign_lib: ?[]const u8 = null,
|
||||
foreign_name: ?[]const u8 = null,
|
||||
/// `extern`-global form `g : T extern [LIB] ["csym"];` — a reference to a
|
||||
/// global defined elsewhere (external linkage, resolved at link time). The
|
||||
/// new extern-named surface; distinct from the legacy `#foreign` path above.
|
||||
/// global defined elsewhere (external linkage, resolved at link time).
|
||||
/// `extern_lib` is the optional source-library reference and `extern_name`
|
||||
/// the optional symbol-name override (mirroring foreign_lib/foreign_name, so
|
||||
/// `extern` fully supersedes `#foreign`). Parsed in Phase 0.1; not consumed
|
||||
/// by the var-decl path until Phase 1.2.
|
||||
/// the optional symbol-name override.
|
||||
is_extern: bool = false,
|
||||
extern_lib: ?[]const u8 = null,
|
||||
extern_name: ?[]const u8 = null,
|
||||
|
||||
Reference in New Issue
Block a user