extra return only if needed

This commit is contained in:
Volker Berlin 2018-05-30 20:41:19 +02:00
parent 6ffd004c2b
commit 19edad4898

View File

@ -176,7 +176,7 @@ public abstract class ModuleWriter implements Closeable {
Iterator<CodeInputStream> byteCodes = code.getByteCodes().iterator();
while( byteCodes.hasNext() ) {
byteCode = byteCodes.next();
writeCodeChunk( byteCode, lineNumber = byteCode.getLineNumber(), method.getConstantPool() );
endWithReturn = writeCodeChunk( byteCode, lineNumber = byteCode.getLineNumber(), method.getConstantPool() );
}
branchManager.handle( byteCode, this ); // write the last end operators
if( !endWithReturn && returnType != null ) {