@@ -400,6 +400,8 @@ private static Type cpIndexToType(int index, ConstantPoolBuilder cp) {
400
400
}
401
401
402
402
private void processMethod () {
403
+ var frames = this .frames ;
404
+ var currentFrame = this .currentFrame ;
403
405
currentFrame .setLocalsFromArg (methodName , methodDesc , isStatic , thisType );
404
406
currentFrame .stackSize = 0 ;
405
407
currentFrame .flags = 0 ;
@@ -415,10 +417,10 @@ private void processMethod() {
415
417
throw generatorError ("Expecting a stack map frame" );
416
418
}
417
419
if (thisOffset == bcs .bci ()) {
420
+ Frame nextFrame = frames .get (stackmapIndex ++);
418
421
if (!ncf ) {
419
- currentFrame .checkAssignableTo (frames . get ( stackmapIndex ) );
422
+ currentFrame .checkAssignableTo (nextFrame );
420
423
}
421
- Frame nextFrame = frames .get (stackmapIndex ++);
422
424
while (!nextFrame .dirty ) { //skip unmatched frames
423
425
if (stackmapIndex == frames .size ()) return ; //skip the rest of this round
424
426
nextFrame = frames .get (stackmapIndex ++);
@@ -429,7 +431,7 @@ private void processMethod() {
429
431
currentFrame .copyFrom (nextFrame );
430
432
nextFrame .dirty = false ;
431
433
} else if (thisOffset < bcs .bci ()) {
432
- throw new ClassFormatError ( String . format ( "Bad stack map offset %d" , thisOffset ) );
434
+ throw generatorError ( "Bad stack map offset" );
433
435
}
434
436
} else if (ncf ) {
435
437
throw generatorError ("Expecting a stack map frame" );
0 commit comments