The first branch in verify() handles native methods by setting up their invocation pointers. That's all that has to be done, and the only information needed is for resolveSignatures to have already been called. avantages: - cleans this cruft out of the verify method, which is too big already. - any early bound method has already been resolved. if we early bind to a final native method (e.g. Math functions), then we will have their final invocation address and can call the code directly; no indirect call required. risks: - can we guarantee f.resolveSignatures will have been called before the first function call? if not, we still need a trampoline. Note: it's *not* okay to cause resolveSignatures to be called earlier than before, to establish this guarantee.
Created attachment 464152 [details] [diff] [review] Install native thunk pointers at method resolve time instead of verify time Snapshot work in progress form April. needs rebasing, probably easiest to do visually from the diff rather than an actual merge.
Note: this probably is a *very* marginal improvement to startup time, but adding the dependency is useful for keeping track of the bug, since many the other bugs dealing with thunks and invocation stubs are also tracked by bug 511873.
I am making this block OSR because it moves native-method issues out of the verify trampolines. OSR adds complexity to trampoline management so landing this bug first will help tame the complexity of introducing OSR.
I'm un-blocking OSR again because at this point we need less things blocking OSR, not more.