ffi 1.10: multi-keyword Obj-C selectors through #objc_call
106/106 regression tests pass (+ffi-objc-call-08-multi-keyword). `#objc_call(s32)(instance, "combine:and:", 7, 42)` round-trips end-to-end via class_addMethod-registered IMP that does `a * 100 + b` → 742. Pins three things: 1. The two-keyword selector "combine:and:" parses, mangles, and interns under the symbol `@OBJC_SELECTOR_REFERENCES_combine_and_` (every `:` → `_` — matches clang). 2. Multi-arg call lowering correctly puts arg0 / arg1 in the right slots after recv / sel. 3. The IMP-side sx fn signature `(self, _cmd, a: s32, b: s32)` with `callconv(.c)` interops with the Obj-C runtime's typical IMP shape, and the runtime forwards the keyword args to the right physical positions. No codegen change — Phase 1.6's variadic-args branch in the `objc_msg_send` lowering already handled this; this test just locks in the surface.
This commit is contained in:
1
tests/expected/ffi-objc-call-08-multi-keyword.exit
Normal file
1
tests/expected/ffi-objc-call-08-multi-keyword.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
2
tests/expected/ffi-objc-call-08-multi-keyword.txt
Normal file
2
tests/expected/ffi-objc-call-08-multi-keyword.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
addMethod = true
|
||||
combine(7, 42) = 742
|
||||
Reference in New Issue
Block a user