refactor(ffi-linkage): Phase 9.2b-fix — use is_extern (not new is_reference) for the runtime-class ref flag

Per user feedback: don't introduce new terminology. The RuntimeClassDecl
reference-vs-define flag (set by the postfix 'extern' modifier, == old prefix
'#foreign #objc_class') is named is_extern, matching the keyword that drives it
and the existing is_extern on VarDecl/IR. Renamed is_reference→is_extern,
is_reference_eff→is_extern_eff; updated the field comment. Snapshot-neutral; green.
This commit is contained in:
agra
2026-06-15 09:06:19 +03:00
parent d27be42a93
commit a15a868391
9 changed files with 34 additions and 34 deletions

View File

@@ -389,7 +389,7 @@ test "lower: objcDefinedStateStructType collects user-declared fields" {
.foreign_path = "SxFoo",
.runtime = .objc_class,
.members = &members,
.is_reference = false,
.is_extern = false,
.is_main = false,
};
@@ -421,7 +421,7 @@ test "lower: objcDefinedStateStructType handles empty field set" {
.foreign_path = "SxEmpty",
.runtime = .objc_class,
.members = &.{},
.is_reference = false,
.is_extern = false,
.is_main = false,
};
@@ -453,7 +453,7 @@ test "lower: objcDefinedStateStructType skips non-field members" {
.foreign_path = "SxMixed",
.runtime = .objc_class,
.members = &members,
.is_reference = false,
.is_extern = false,
.is_main = false,
};
@@ -481,7 +481,7 @@ test "lower: objcTypeEncodingFromSignature emits @ for Obj-C class pointers" {
.foreign_path = "NSString",
.runtime = .objc_class,
.members = &.{},
.is_reference = true,
.is_extern = true,
.is_main = false,
};
try lowering.program_index.runtime_class_map.put("NSString", &ns_fcd);
@@ -514,7 +514,7 @@ test "lower: objcTypeEncodingFromSignature unwraps optional to wire type" {
.foreign_path = "NSString",
.runtime = .objc_class,
.members = &.{},
.is_reference = true,
.is_extern = true,
.is_main = false,
};
try lowering.program_index.runtime_class_map.put("NSString", &ns_fcd);
@@ -683,7 +683,7 @@ test "lower: isObjcClassPointer recognises pointer-to-foreign-Obj-C-class" {
.foreign_path = "NSString",
.runtime = .objc_class,
.members = &.{},
.is_reference = true,
.is_extern = true,
.is_main = false,
};
try lowering.program_index.runtime_class_map.put("NSString", &ns_fcd);
@@ -699,7 +699,7 @@ test "lower: isObjcClassPointer recognises pointer-to-foreign-Obj-C-class" {
.foreign_path = "NSCopying",
.runtime = .objc_protocol,
.members = &.{},
.is_reference = true,
.is_extern = true,
.is_main = false,
};
try lowering.program_index.runtime_class_map.put("NSCopying", &proto_fcd);
@@ -731,7 +731,7 @@ test "lower: objcPropertyKind defaults + explicit ARC modifiers" {
.foreign_path = "NSString",
.runtime = .objc_class,
.members = &.{},
.is_reference = true,
.is_extern = true,
.is_main = false,
};
try lowering.program_index.runtime_class_map.put("NSString", &ns_fcd);
@@ -756,7 +756,7 @@ test "lower: objcPropertyKind defaults + explicit ARC modifiers" {
.foreign_path = "NSCoding",
.runtime = .objc_protocol,
.members = &.{},
.is_reference = true,
.is_extern = true,
.is_main = false,
};
try lowering.program_index.runtime_class_map.put("NSCoding", &proto_fcd);