refactor(ffi-linkage): Phase 9.3 — purge 'foreign' from comments (src caps + examples + docs)

src/: ~21 capital-Foreign comments the case-sensitive verify grep missed
(Foreign-class→Runtime-class, Foreign path→Runtime path, Foreign decls→Extern decls,
FOREIGN function→extern function) across calls/inst/ffi_objc/jni_descriptor/emit_llvm/
c_import/lower.*/ops. src 'foreign' now = ONLY the hash_foreign token + 4 rejection
messages (9.0-delete targets). examples/*.sx comments → extern/runtime-class (1219
stdout regen; KEPT 1176). docs/inline-asm-design + debugger purged. Comments only —
no build impact. 9.0 ratified: DELETE hash_foreign token next.
This commit is contained in:
agra
2026-06-15 10:52:56 +03:00
parent dc51c4b5bf
commit 811a280517
57 changed files with 198 additions and 125 deletions

View File

@@ -137,8 +137,8 @@ pub fn lookupObjcDefinedStateFieldOnPointer(self: *Lowering, obj_expr: *const as
if (pointee_info != .@"struct") return null;
const struct_name = self.module.types.getString(pointee_info.@"struct".name);
const fcd = self.program_index.runtime_class_map.get(struct_name) orelse return null;
// Only sx-defined Obj-C classes have a state struct. Foreign
// classes' fields are purely declaration metadata (no state).
// Only sx-defined Obj-C classes have a state struct. Extern (referenced)
// runtime classes' fields are purely declaration metadata (no state).
if (fcd.is_extern or fcd.runtime != .objc_class) return null;
// Skip property fields — those dispatch via the M2.2 getter/setter
// path. Plain instance fields take the ivar+gep path.