mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
add support for ref.is_null to wat parser
This commit is contained in:
parent
5e2b65ddd0
commit
6d7c8b12a9
@ -175,6 +175,9 @@ public class WatParser extends WasmCodeBuilder {
|
||||
case "f64.trunc":
|
||||
addNumericInstruction( NumericOperator.trunc, ValueType.f64, javaCodePos, lineNumber );
|
||||
break;
|
||||
case "ref.is_null":
|
||||
addNumericInstruction( NumericOperator.ifnull, ValueType.i32, javaCodePos, lineNumber );
|
||||
break;
|
||||
case "table.get":
|
||||
addTableInstruction( true, getInt( tokens, ++i), javaCodePos, lineNumber );
|
||||
break;
|
||||
|
@ -269,6 +269,11 @@ public class WatParserTest {
|
||||
test( "f64.trunc" );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ref_is_null() throws IOException {
|
||||
test( "ref.is_null" );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void return_() throws IOException {
|
||||
test( "return" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user