Request for reviews (S): 7011839: JSR 292 turn on escape analysis when using invokedynamic

John Rose john.r.rose at
Wed Jan 12 15:00:08 PST 2011

On Jan 12, 2011, at 5:46 AM, Christian Thalinger wrote:


The arg_size computation is very fragile.  To start with, the arg_size value should be computed in one place.

As the code is written, arg_base points at the implicit argument to indy, which (I think) is not really on the stack.

I suggest this code:

 234   // compute size of arguments
 235   int arg_size = target->arg_size();
          if (code == Bytecodes::_invokedynamic) {
            assert(!target->is_static(), "receiver explicit in method");
            arg_size--;  // implicit, not really on stack
 236   if (!target->is_loaded() && code == Bytecodes::_invokestatic) {
            assert(!target->is_static(), "receiver explicit in unloaded method");
 237     arg_size--;
 238   }

The second assertion is for good measure.  The bare "arg_size--" makes me nervous.

Otherwise, good.

-- John

More information about the hotspot-compiler-dev mailing list