refactor(ffi-linkage): Phase 9.2b — rename runtime-class fns + state → runtime_* / is_reference
The runtime-class object-model identifiers (Decision 5): parse/lower/find/resolve/ register/stamp fns Foreign→Runtime (parseRuntimeClassDecl, lowerRuntimeMethodCall, findRuntimeMethodInChain, resolveRuntimeMethodReturnType, registerRuntimeClassDecl, runtimeClassStructType, runtimeKindForOffset, …); state foreign_class_map→ runtime_class_map, current_foreign_class/_method→current_runtime_*, the foreign_class_decl union variant→runtime_class_decl, foreign_method/static/instance/ class→runtime_*; and the reference-vs-define flag is_foreign→is_reference (+ is_foreign_eff→is_reference_eff) now that it only lives on RuntimeClassDecl. Snapshot-neutral; suite green (646/444). Remaining 9.2: the foreign_path family (coupled .sx hooks: jni_main_foreign_path_at spans build.sx/bundle.sx/compiler_hooks.zig/specs.md) + the extern-ref validators (checkForeignRefs etc. → Extern, linkage not runtime) + bare 'foreign' comments.
This commit is contained in:
@@ -665,7 +665,7 @@ pub const ProgramIndex = struct {
|
||||
/// resolve. Keyed/allocated with the lowering allocator.
|
||||
qualified_fn_source: std.StringHashMap([]const u8),
|
||||
/// sx alias → RuntimeClassDecl (jni_class / objc_class / swift_class / ... — registered in scan pass).
|
||||
foreign_class_map: std.StringHashMap(*const ast.RuntimeClassDecl),
|
||||
runtime_class_map: std.StringHashMap(*const ast.RuntimeClassDecl),
|
||||
/// `#run` global name → GlobalId.
|
||||
global_names: std.StringHashMap(GlobalInfo),
|
||||
/// Type alias name → target TypeId. The single-source alias table; passed
|
||||
@@ -708,7 +708,7 @@ pub const ProgramIndex = struct {
|
||||
.fn_ast_map = std.StringHashMap(*const ast.FnDecl).init(alloc),
|
||||
.qualified_fn_source = std.StringHashMap([]const u8).init(alloc),
|
||||
.global_names = std.StringHashMap(GlobalInfo).init(alloc),
|
||||
.foreign_class_map = std.StringHashMap(*const ast.RuntimeClassDecl).init(alloc),
|
||||
.runtime_class_map = std.StringHashMap(*const ast.RuntimeClassDecl).init(alloc),
|
||||
.type_alias_map = std.StringHashMap(TypeId).init(alloc),
|
||||
.struct_template_map = std.StringHashMap(StructTemplate).init(alloc),
|
||||
.struct_template_by_decl = std.AutoHashMap(imports.DeclId, StructTemplate).init(alloc),
|
||||
@@ -728,7 +728,7 @@ pub const ProgramIndex = struct {
|
||||
self.import_flags.deinit();
|
||||
self.fn_ast_map.deinit();
|
||||
self.qualified_fn_source.deinit();
|
||||
self.foreign_class_map.deinit();
|
||||
self.runtime_class_map.deinit();
|
||||
self.global_names.deinit();
|
||||
self.type_alias_map.deinit();
|
||||
self.struct_template_map.deinit();
|
||||
|
||||
Reference in New Issue
Block a user