481 } |
481 } |
482 |
482 |
483 /** Emit an invokedynamic instruction. |
483 /** Emit an invokedynamic instruction. |
484 */ |
484 */ |
485 public void emitInvokedynamic(int desc, Type mtype) { |
485 public void emitInvokedynamic(int desc, Type mtype) { |
486 // N.B. this format is under consideration by the JSR 292 EG |
|
487 int argsize = width(mtype.getParameterTypes()); |
486 int argsize = width(mtype.getParameterTypes()); |
488 int prevPos = pendingStatPos; |
487 emitop(invokedynamic); |
489 try { |
|
490 //disable line number generation (we could have used 'emit1', that |
|
491 //bypasses stackmap generation - which is needed for indy calls) |
|
492 pendingStatPos = Position.NOPOS; |
|
493 emitop(invokedynamic); |
|
494 } finally { |
|
495 pendingStatPos = prevPos; |
|
496 } |
|
497 if (!alive) return; |
488 if (!alive) return; |
498 emit2(desc); |
489 emit2(desc); |
499 emit2(0); |
490 emit2(0); |
500 state.pop(argsize); |
491 state.pop(argsize); |
501 state.push(mtype.getReturnType()); |
492 state.push(mtype.getReturnType()); |