Request for review (S): 7174928: JSR 292: unresolved invokedynamic call sites deopt and osr infinitely (original) (raw)

Christian Thalinger christian.thalinger at oracle.com
Tue Jun 12 15:00:21 PDT 2012


On Jun 12, 2012, at 1:14 PM, Roland Westrelin wrote:

Good point. I looked at this again and the only other code using this (and where I got this pattern from in the first place) is NewMultiArray. And there it's used correctly:

CodeEmitInfo* patchinginfo = NULL; if (!x->klass()->isloaded() || PatchALot) { patchinginfo = statefor(x, x->statebefore()); // cannot re-use same xhandlers for multiple CodeEmitInfos, so // clone all handlers. This is handled transparently in other // places by the CodeEmitInfo cloning logic but is handled // specially here because a stub isn't being used. x->setexceptionhandlers(new XHandlers(x->exceptionhandlers())); } CodeEmitInfo* info = statefor(x, x->state()); If you look at some of the stubs constructors, you'll find this pattern: info = new CodeEmitInfo(info); and the CodeEmitInfo copy constructor does: // deep copy of exception handlers if (info->exceptionhandlers != NULL) { exceptionhandlers = new XHandlers(info->exceptionhandlers); } which is the same as: x->setexceptionhandlers(new XHandlers(x->exceptionhandlers())); So in your case with the DeoptimizeStub you don't need the explicit setexceptionhandlers(), right?

Correct. Now the comment for NewMultiArray makes sense. I removed that code, changed the comment in do_NewMultiArray and updated the webrev.

-- Chris

Roland.



More information about the hotspot-compiler-dev mailing list