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:
@@ -1,8 +1,8 @@
|
||||
// `xx self` inside a BOOL-returning `#objc_class` method must
|
||||
// resolve to the full receiver pointer at a foreign-class method
|
||||
// resolve to the full receiver pointer at a runtime-class method
|
||||
// call site, not get truncated to i8 by the enclosing function's
|
||||
// BOOL return type. Regression locks in the
|
||||
// `resolveCallParamTypes` fix that threads foreign-class method
|
||||
// `resolveCallParamTypes` fix that threads runtime-class method
|
||||
// param types correctly even when the receiver is a `extern
|
||||
// #objc_class` alias. Every probe round-trips the receiver pointer
|
||||
// — a regression would read only the low byte and the observer
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
g_observer : *void = null;
|
||||
|
||||
// Stand-in for NSNotificationCenter — we just need a foreign-class
|
||||
// Stand-in for NSNotificationCenter — we just need a runtime-class
|
||||
// method with several *void args so the call site's arg-target-type
|
||||
// resolution exercises the same path as uikit.sx's keyboard observer.
|
||||
SxIssue44Bus :: #objc_class("NSNotificationCenter") extern {
|
||||
@@ -44,7 +44,7 @@ SxIssue44Foo :: #objc_class("SxIssue44Foo") {
|
||||
// SxAppDelegate-shape: BOOL return + 2 extra *void args. Pre-fix,
|
||||
// the call to addObserver:... would receive `xx this` truncated to
|
||||
// its low byte (because resolveCallParamTypes returned `&.{}` for
|
||||
// foreign-class receivers and `self.target_type` leaked the BOOL
|
||||
// runtime-class receivers and `self.target_type` leaked the BOOL
|
||||
// return type into the call's args).
|
||||
appDelegate_options :: (this: *Self, app: *void, opts: *void) -> BOOL {
|
||||
bus := SxIssue44Bus.defaultCenter();
|
||||
@@ -87,7 +87,7 @@ main :: () -> i32 {
|
||||
print("me: WRONG\n");
|
||||
}
|
||||
|
||||
// The actual repro: BOOL return + foreign-class method call.
|
||||
// The actual repro: BOOL return + runtime-class method call.
|
||||
// Pre-fix: `xx this` truncated to i8, capture_observer receives
|
||||
// (low_byte_of_f) cast back to *void, which won't equal f_void.
|
||||
g_observer = null;
|
||||
|
||||
Reference in New Issue
Block a user