mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 15:37:52 +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":
|
case "f64.trunc":
|
||||||
addNumericInstruction( NumericOperator.trunc, ValueType.f64, javaCodePos, lineNumber );
|
addNumericInstruction( NumericOperator.trunc, ValueType.f64, javaCodePos, lineNumber );
|
||||||
break;
|
break;
|
||||||
|
case "ref.is_null":
|
||||||
|
addNumericInstruction( NumericOperator.ifnull, ValueType.i32, javaCodePos, lineNumber );
|
||||||
|
break;
|
||||||
case "table.get":
|
case "table.get":
|
||||||
addTableInstruction( true, getInt( tokens, ++i), javaCodePos, lineNumber );
|
addTableInstruction( true, getInt( tokens, ++i), javaCodePos, lineNumber );
|
||||||
break;
|
break;
|
||||||
|
@ -269,6 +269,11 @@ public class WatParserTest {
|
|||||||
test( "f64.trunc" );
|
test( "f64.trunc" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void ref_is_null() throws IOException {
|
||||||
|
test( "ref.is_null" );
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void return_() throws IOException {
|
public void return_() throws IOException {
|
||||||
test( "return" );
|
test( "return" );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user