Open srikanth-sankaran opened 15 hours ago
See that neither org.eclipse.jdt.internal.compiler.ast.TryStatement.generateFinallyBlock(BlockScope, CodeStream, Object, int, LocalVariableBinding)
nor org.eclipse.jdt.internal.compiler.ast.SynchronizedStatement.generateFinallyBlock(BlockScope, CodeStream, Object, int, LocalVariableBinding)
touches the last parameter corresponding to the secret variable.
ReturnStatement
goes to some lengths to process and plumb this secret variable through to finally code generation, all for nothing!
Only impediment to this significant clean up will likely be many test failures due to bytecode disassembly differences and comparator differences :(
Shouldn't be a problem, we've managed to fo through this in the past. So this shouldn't be a reason to not cleanup code generation.
org.eclipse.jdt.internal.compiler.ast.TryStatement
creates a secret variable where a return statement in the the try block can stash away the value to be returned which can then be picked up by the finally block.This mechanism is for the jsr/ret days and has no place in the JDK6+ code generation scheme.
Only impediment to this significant clean up will likely be many test failures due to bytecode disassembly differences and comparator differences :(