Repository navigation
ObjC: a message send keeps its receiver as the call qualifier (Part of #5639) - #5777
Conversation
… of #5639) calls_out groups are now (C callee, receiver chain, selector); the detector records self / super / Foo / obj.view (-> reads as .) and <expr> for a nested send or call receiver. The resolver still looks objc up by selector name (methods carry no owner; a receiver qualifier alone dropped scoped links on doom-ios 105 -> 13). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #5777 @ c203eef: 2 failed check(s) == Call resolution (Level 2, vs pyan3) (failure) -- real == graph-accuracy-audit (failure) -- real |
|
No description provided. |
|
PR #5777 @ 822553b: 1 failed check(s) == Call resolution (Level 2, vs pyan3) (failure) -- real |
|
No description provided. |
Part of #5639
What
#5689 already records Objective-C message sends by selector (unary, keyword, nested,
[super x], inside a C call) and decided that@selector(x:)is not a call. This slice finishes the one open item of the first-slice acceptance: the receiver is kept as the call's qualifier.calls_outgroups are now (C callee, receiver chain, selector). The detector recordsself,super,Foo,obj.view(->reads as.), a cast receiver as its name ([(Foo *)obj bar:1]->obj), and<expr>for a receiver that is itself a send or a call. C calls keep the bare""qualifier.Design decision: the resolver still looks objc up by selector name (
call_resolver._resolve_onedrops the qualifier forobjective-c). Objc units carry no owner, so a receiver cannot narrow a lookup, and a qualifier alone made resolution worse: doom-ios objective-c scoped 105 -> 13, external 178 -> 275. With the resolver bypass the resolution rates are byte-identical to main (table below). The qualifier is data (SQLitecalls_out_qualifiers) until objc units get owners.Changes (5 hand-written files)
languages/objectivec.py: receiver capture group; top-levelcalls_out_message_receiversflag.core/detector.py: the C-style qualified branch also runs for that flag;_message_receiver().core/call_resolver.py: objc ignores the qualifier (4 lines, reason in the comment).test_calls_out_objc_messages_5639.py: 11 qualifier shapes (self/super/class/ivar chain/->/cast/nested/call/dedupe/C call).test_objectivec_strict.py: group count 3.Class table
[super x],@selector(not a call)self,super, class,->, cast, nested/call (<expr>)[f(x) a:1]Evidence
fcall_rate_dataobjective-c row, scan of doom-ios and chocolate-doom on main vs this branch (GALAXYSCOPE_MAX_WORKERS=1):Without the resolver bypass: doom-ios 13/71/9/275/368. doom-ios
awakeFromNibrow now storescalls_out_qualifiers = ["self"].Gates:
pr_gates --fast6/6;--ratchets8/8 pass (0 skipped); golden masters:crucible_check.py --update --yesreports no drift on both legs (fixtures do not record qualifiers); tree-wide guards + the three objc test files 321 passed. Localaudit_check.pymypy step flags the shared venv's missing stubs;pr_gatesaudits (CI mypy 2.4.0) pass.Lessons for agents
tests/tools/box/heavy-run.shresetsPYTHONPATHto its own checkout: a baseline scan from a second worktree must call that worktree'sheavy-run.shwithenv PYTHONPATH=<it>, or both runs silently use your branch.~/.cache/gitgalaxy/ruff-0.16.10is a directory; the binary is.../bin/ruff.crucible_check.pyneedsLANGUAGE_CRUCIBLE_PATH=/srv/storage_16tb/projects/gitgalaxy/language-crucibleexported in a worktree.🤖 Generated with Claude Code