mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 15:37:52 +01:00
write the last end operators
This commit is contained in:
parent
4c1b53a6d0
commit
83013cd5f2
@ -17,6 +17,7 @@ package de.inetsoftware.jwebassembly.module;
|
|||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
@ -138,9 +139,13 @@ public abstract class ModuleWriter implements Closeable {
|
|||||||
branchManager.calculate();
|
branchManager.calculate();
|
||||||
localVariables.calculate();
|
localVariables.calculate();
|
||||||
|
|
||||||
for( CodeInputStream byteCode : code.getByteCodes() ) {
|
CodeInputStream byteCode = null;
|
||||||
|
Iterator<CodeInputStream> byteCodes = code.getByteCodes().iterator();
|
||||||
|
while( byteCodes.hasNext() ) {
|
||||||
|
byteCode = byteCodes.next();
|
||||||
writeCodeChunk( byteCode, lineNumber = byteCode.getLineNumber(), method.getConstantPool() );
|
writeCodeChunk( byteCode, lineNumber = byteCode.getLineNumber(), method.getConstantPool() );
|
||||||
}
|
}
|
||||||
|
branchManager.handle( byteCode, this ); // write the last end operators
|
||||||
writeMethodFinish( localVariables.getLocalTypes( paramCount ) );
|
writeMethodFinish( localVariables.getLocalTypes( paramCount ) );
|
||||||
}
|
}
|
||||||
} catch( Exception ioex ) {
|
} catch( Exception ioex ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user