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

@@ -722,7 +722,7 @@ pub fn lowerCall(self: *Lowering, c_in: *const ast.Call) Ref {
switch (self.namespaceAliasVerdict(oname)) {
.target => |target| {
const fd = Lowering.namespaceFnMember(&target, fa.field) orelse break :gate;
// Foreign / builtin / #compiler bodies keep their
// Extern / builtin / #compiler bodies keep their
// literal global symbol — the existing bare-name
// machinery below resolves them.
switch (fd.body.data) {
@@ -891,7 +891,7 @@ pub fn lowerCall(self: *Lowering, c_in: *const ast.Call) Ref {
method_args.append(self.alloc, a) catch unreachable;
}
// Foreign-class DSL: `inst.method(args)` where `inst`'s
// Runtime-class DSL: `inst.method(args)` where `inst`'s
// type is an alias declared by `#jni_class("...") { ... }`
// (or its parallel forms). Routes to the JNI dispatch
// shape, descriptor derived from the sx signature.
@@ -2236,7 +2236,7 @@ pub fn resolveCallParamTypes(self: *Lowering, c: *const ast.Call, sel_author: ?*
}
}
if (self.getStructTypeName(obj_ty)) |sname| {
// Foreign-class receiver (`#objc_class` / `#jni_class` / etc.):
// Runtime-class receiver (`#objc_class` / `#jni_class` / etc.):
// resolve the method from `runtime_class_map` walking `#extends`.
// Without this path, `target_type` for each arg falls back to
// whatever `self.target_type` was on entry — typically the