private void addNormalizationRollback ( CodeBuilder b , Label doTryStart , List < PropertyCopy > unnormalized ) { if ( unnormalized == null ) { return ; } Label doTryEnd = b . createLabel ( ) . setLocation ( ) ; b . dup ( ) ; Label success = b . createLabel ( ) ; b . ifZeroComparisonBranch ( success , "!=" ) ; for ( int i = 0 ; i < 2 ; i ++ ) { if ( i == 0 ) { } else { b . exceptionHandler ( doTryStart , doTryEnd , null ) ; } // Rollback normalized properties. for ( PropertyCopy copy : unnormalized ) { copy . restore ( b ) ; } if ( i == 0 ) { b . branch ( success ) ; } else { b . throwObject ( ) ; } } success . setLocation ( ) ; }
Assumes a boolean is on the stack as returned by doTryInsert or doTryUpdate .