mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
handle the block operator
This commit is contained in:
parent
02c76d407e
commit
987d26de64
@ -635,6 +635,10 @@ public class BinaryModuleWriter extends ModuleWriter implements InstructionOpcod
|
||||
case DROP:
|
||||
codeStream.write( DROP );
|
||||
break;
|
||||
case BLOCK:
|
||||
codeStream.write( BLOCK );
|
||||
codeStream.write( 0x40 ); // void; the return type of the block. currently we does not use it
|
||||
break;
|
||||
default:
|
||||
throw new Error( "Unknown block: " + op );
|
||||
}
|
||||
|
@ -29,4 +29,6 @@ public enum BlockOperator {
|
||||
END,
|
||||
GOTO,
|
||||
DROP,
|
||||
BLOCK,
|
||||
SWITCH,
|
||||
}
|
||||
|
@ -271,6 +271,10 @@ public class TextModuleWriter extends ModuleWriter {
|
||||
case DROP:
|
||||
name = "drop";
|
||||
break;
|
||||
case BLOCK:
|
||||
name = "block";
|
||||
insetAfter++;
|
||||
break;
|
||||
default:
|
||||
throw new Error( "Unknown block: " + op );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user