remove type annotation from ref.is_null. Disable node until a new v8 canary version is available.

This commit is contained in:
Volker Berlin 2020-06-29 21:00:47 +02:00
parent e4f90cae6f
commit 6d2a90785c
5 changed files with 7 additions and 8 deletions

View File

@ -451,7 +451,7 @@ interface InstructionOpcodes {
static final int REF_NULL = 0xD0; static final int REF_NULL = 0xD0;
static final int REF_ISNULL = 0xD16F; // "ref.is_null extern" static final int REF_ISNULL = 0xD1;
/** converts a nullable reference to a non-nullable one or traps if null */ /** converts a nullable reference to a non-nullable one or traps if null */
static final int REF_AS_NON_NULL = 0xD3; static final int REF_AS_NON_NULL = 0xD3;

View File

@ -570,11 +570,11 @@ public class TextModuleWriter extends ModuleWriter {
op += "_s"; op += "_s";
break; break;
case ifnonnull: case ifnonnull:
op = "ref.is_null extern"; op = "ref.is_null";
negate = true; negate = true;
break; break;
case ifnull: case ifnull:
op = "ref.is_null extern"; op = "ref.is_null";
break; break;
case ref_ne: case ref_ne:
op = options.useGC() ? "ref.eq" : null; op = options.useGC() ? "ref.eq" : null;

View File

@ -214,7 +214,6 @@ public class WatParser extends WasmCodeBuilder {
addNumericInstruction( NumericOperator.trunc, ValueType.f64, javaCodePos, lineNumber ); addNumericInstruction( NumericOperator.trunc, ValueType.f64, javaCodePos, lineNumber );
break; break;
case "ref.is_null": case "ref.is_null":
get( tokens, ++i ); // skip type, TODO
addNumericInstruction( NumericOperator.ifnull, ValueType.i32, javaCodePos, lineNumber ); addNumericInstruction( NumericOperator.ifnull, ValueType.i32, javaCodePos, lineNumber );
break; break;
case "table.get": case "table.get":

View File

@ -46,10 +46,10 @@ public enum ScriptEngine {
public static ScriptEngine[] testEngines() { public static ScriptEngine[] testEngines() {
ScriptEngine[] val = { // ScriptEngine[] val = { //
SpiderMonkey, // SpiderMonkey, //
NodeJS, // //NodeJS, //
NodeWat, // //NodeWat, //
SpiderMonkeyWat,// SpiderMonkeyWat,//
Wat2Wasm, // //Wat2Wasm, //
}; };
return val; return val;
} }

View File

@ -321,7 +321,7 @@ public class WatParserTest {
@Test @Test
public void ref_is_null() throws IOException { public void ref_is_null() throws IOException {
test( "ref.is_null extern" ); test( "ref.is_null" );
} }
@Test @Test