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_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 */
static final int REF_AS_NON_NULL = 0xD3;

View File

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

View File

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

View File

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

View File

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