Add 'swiftisa' argument attribute [NOT FOR CHECKIN]#62
Add 'swiftisa' argument attribute [NOT FOR CHECKIN]#62slavapestov wants to merge 1 commit intoapple:stablefrom
Conversation
|
@atrick @rjmccall @aschwaighofer behold the madness |
|
Is this for class-method invocation functions? @atrick and I were talking about this earlier. |
a6b7c20 to
21bb278
Compare
|
@rjmccall It's one possible strategy for implementing resilient class method invocation in a way that works for 'super' calls, yeah. |
|
Yeah, the concerning things about this approach are (1) adding yet more CC complexity and (2) needing to slow down the presumably-much-more-important fast path of dynamic dispatch. |
|
@rjmccall by 'fast path' you mean the case where the method has no overrides and the thunk jumps directly to the implementation without going through the vtable? We do that that unnecessary 'isa' pointer load in that case, or are you thinking of something else? |
|
Oh, I think I was imagining something a little different, where the isa argument would be optional, with nil indicating a normal dispatch. I'm not sure why I was thinking of that instead of the more obvious "caller always loads the isa first", although ugh, the code-size impact of that. |
|
Anyway, the alternative I was thinking of was maybe having a module/class-combination-specific lookup function that would be keyed by the addresses of the invocation functions published by that module for that class. The lookup function wouldn't be the most efficient thing, but it's not clear that it would need to be, since this is just used for resilient peer/super dispatch. |
No description provided.