Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.
/ swift-llvm Public archive

Add 'swiftisa' argument attribute [NOT FOR CHECKIN] #62

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

slavapestov
Copy link
Member

No description provided.

@slavapestov
Copy link
Member Author

@atrick @rjmccall @aschwaighofer behold the madness

@rjmccall
Copy link
Member

rjmccall commented Oct 3, 2017

Is this for class-method invocation functions? @atrick and I were talking about this earlier.

@slavapestov
Copy link
Member Author

@rjmccall It's one possible strategy for implementing resilient class method invocation in a way that works for 'super' calls, yeah.

@rjmccall
Copy link
Member

rjmccall commented Oct 3, 2017

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.

@slavapestov
Copy link
Member Author

@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?

@rjmccall
Copy link
Member

rjmccall commented Oct 3, 2017

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.

@rjmccall
Copy link
Member

rjmccall commented Oct 3, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants