mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
Add support for the loop operator
This commit is contained in:
parent
2cb0988e68
commit
652d6c3d6a
@ -656,6 +656,10 @@ public class BinaryModuleWriter extends ModuleWriter implements InstructionOpcod
|
||||
codeStream.writeVaruint32( i );
|
||||
}
|
||||
break;
|
||||
case LOOP:
|
||||
codeStream.write( LOOP );
|
||||
codeStream.write( 0x40 ); // void; the return type of the loop. currently we does not use it
|
||||
break;
|
||||
default:
|
||||
throw new Error( "Unknown block: " + op );
|
||||
}
|
||||
|
@ -32,4 +32,5 @@ public enum WasmBlockOperator {
|
||||
BR,
|
||||
BR_IF,
|
||||
BR_TABLE,
|
||||
LOOP,
|
||||
}
|
||||
|
@ -289,6 +289,10 @@ public class TextModuleWriter extends ModuleWriter {
|
||||
}
|
||||
name = builder.toString();
|
||||
break;
|
||||
case LOOP:
|
||||
name = "loop";
|
||||
insetAfter++;
|
||||
break;
|
||||
default:
|
||||
throw new Error( "Unknown block: " + op );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user