diff --git a/src/wasm/function-body-decoder-impl.h b/src/wasm/function-body-decoder-impl.h index 6fd5617ff4..aa1368f609 100644 --- a/src/wasm/function-body-decoder-impl.h +++ b/src/wasm/function-body-decoder-impl.h @@ -3175,9 +3175,6 @@ class WasmFullDecoder : public WasmDecoder { } void BuildSimplePrototypeOperator(WasmOpcode opcode) { - if (WasmOpcodes::IsSignExtensionOpcode(opcode)) { - RET_ON_PROTOTYPE_OPCODE(se); - } if (WasmOpcodes::IsAnyRefOpcode(opcode)) { RET_ON_PROTOTYPE_OPCODE(anyref); } diff --git a/src/wasm/wasm-feature-flags.h b/src/wasm/wasm-feature-flags.h index 8b87462af5..870f08deaa 100644 --- a/src/wasm/wasm-feature-flags.h +++ b/src/wasm/wasm-feature-flags.h @@ -18,10 +18,9 @@ V(mv, "multi-value support", false) \ V(type_reflection, "wasm type reflection in JS", false) -#define FOREACH_WASM_SHIPPED_FEATURE_FLAG(V) \ - V(bulk_memory, "bulk memory opcodes", true) \ - V(sat_f2i_conversions, "saturating float conversion opcodes", true) \ - V(se, "sign extension opcodes", true) +#define FOREACH_WASM_SHIPPED_FEATURE_FLAG(V) \ + V(bulk_memory, "bulk memory opcodes", true) \ + V(sat_f2i_conversions, "saturating float conversion opcodes", true) #define FOREACH_WASM_FEATURE_FLAG(V) \ FOREACH_WASM_EXPERIMENTAL_FEATURE_FLAG(V) \ diff --git a/src/wasm/wasm-opcodes.cc b/src/wasm/wasm-opcodes.cc index 97a5197351..5f5a9fd407 100644 --- a/src/wasm/wasm-opcodes.cc +++ b/src/wasm/wasm-opcodes.cc @@ -422,19 +422,6 @@ bool WasmOpcodes::IsUnconditionalJump(WasmOpcode opcode) { } } -bool WasmOpcodes::IsSignExtensionOpcode(WasmOpcode opcode) { - switch (opcode) { - case kExprI32SExtendI8: - case kExprI32SExtendI16: - case kExprI64SExtendI8: - case kExprI64SExtendI16: - case kExprI64SExtendI32: - return true; - default: - return false; - } -} - bool WasmOpcodes::IsAnyRefOpcode(WasmOpcode opcode) { switch (opcode) { case kExprRefNull: diff --git a/src/wasm/wasm-opcodes.h b/src/wasm/wasm-opcodes.h index f8387a8156..74f3e7046c 100644 --- a/src/wasm/wasm-opcodes.h +++ b/src/wasm/wasm-opcodes.h @@ -220,15 +220,14 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures&); V(I32ReinterpretF32, 0xbc, i_f) \ V(I64ReinterpretF64, 0xbd, l_d) \ V(F32ReinterpretI32, 0xbe, f_i) \ - V(F64ReinterpretI64, 0xbf, d_l) + V(F64ReinterpretI64, 0xbf, d_l) \ + V(I32SExtendI8, 0xc0, i_i) \ + V(I32SExtendI16, 0xc1, i_i) \ + V(I64SExtendI8, 0xc2, l_l) \ + V(I64SExtendI16, 0xc3, l_l) \ + V(I64SExtendI32, 0xc4, l_l) -#define FOREACH_SIMPLE_PROTOTYPE_OPCODE(V) \ - V(I32SExtendI8, 0xc0, i_i) \ - V(I32SExtendI16, 0xc1, i_i) \ - V(I64SExtendI8, 0xc2, l_l) \ - V(I64SExtendI16, 0xc3, l_l) \ - V(I64SExtendI32, 0xc4, l_l) \ - V(RefIsNull, 0xd1, i_r) +#define FOREACH_SIMPLE_PROTOTYPE_OPCODE(V) V(RefIsNull, 0xd1, i_r) // For compatibility with Asm.js. #define FOREACH_ASMJS_COMPAT_OPCODE(V) \ @@ -669,7 +668,6 @@ class V8_EXPORT_PRIVATE WasmOpcodes { static FunctionSig* AsmjsSignature(WasmOpcode opcode); static bool IsPrefixOpcode(WasmOpcode opcode); static bool IsControlOpcode(WasmOpcode opcode); - static bool IsSignExtensionOpcode(WasmOpcode opcode); static bool IsAnyRefOpcode(WasmOpcode opcode); static bool IsThrowingOpcode(WasmOpcode opcode); // Check whether the given opcode always jumps, i.e. all instructions after diff --git a/test/cctest/wasm/test-run-wasm-sign-extension.cc b/test/cctest/wasm/test-run-wasm-sign-extension.cc index 1514699db8..d6a6478f45 100644 --- a/test/cctest/wasm/test-run-wasm-sign-extension.cc +++ b/test/cctest/wasm/test-run-wasm-sign-extension.cc @@ -11,7 +11,6 @@ namespace internal { namespace wasm { WASM_EXEC_TEST(I32SExtendI8) { - EXPERIMENTAL_FLAG_SCOPE(se); WasmRunner r(execution_tier); BUILD(r, WASM_I32_SIGN_EXT_I8(WASM_GET_LOCAL(0))); CHECK_EQ(0, r.Call(0)); @@ -22,7 +21,6 @@ WASM_EXEC_TEST(I32SExtendI8) { } WASM_EXEC_TEST(I32SExtendI16) { - EXPERIMENTAL_FLAG_SCOPE(se); WasmRunner r(execution_tier); BUILD(r, WASM_I32_SIGN_EXT_I16(WASM_GET_LOCAL(0))); CHECK_EQ(0, r.Call(0)); @@ -33,7 +31,6 @@ WASM_EXEC_TEST(I32SExtendI16) { } WASM_EXEC_TEST(I64SExtendI8) { - EXPERIMENTAL_FLAG_SCOPE(se); WasmRunner r(execution_tier); BUILD(r, WASM_I64_SIGN_EXT_I8(WASM_GET_LOCAL(0))); CHECK_EQ(0, r.Call(0)); @@ -44,7 +41,6 @@ WASM_EXEC_TEST(I64SExtendI8) { } WASM_EXEC_TEST(I64SExtendI16) { - EXPERIMENTAL_FLAG_SCOPE(se); WasmRunner r(execution_tier); BUILD(r, WASM_I64_SIGN_EXT_I16(WASM_GET_LOCAL(0))); CHECK_EQ(0, r.Call(0)); @@ -55,7 +51,6 @@ WASM_EXEC_TEST(I64SExtendI16) { } WASM_EXEC_TEST(I64SExtendI32) { - EXPERIMENTAL_FLAG_SCOPE(se); WasmRunner r(execution_tier); BUILD(r, WASM_I64_SIGN_EXT_I32(WASM_GET_LOCAL(0))); CHECK_EQ(0, r.Call(0)); diff --git a/test/unittests/wasm/function-body-decoder-unittest.cc b/test/unittests/wasm/function-body-decoder-unittest.cc index be6ad97552..22411f8a21 100644 --- a/test/unittests/wasm/function-body-decoder-unittest.cc +++ b/test/unittests/wasm/function-body-decoder-unittest.cc @@ -1347,7 +1347,6 @@ TEST_F(FunctionBodyDecoderTest, MacrosInt64) { } TEST_F(FunctionBodyDecoderTest, AllSimpleExpressions) { - WASM_FEATURE_SCOPE(se); WASM_FEATURE_SCOPE(anyref); // Test all simple expressions which are described by a signature. #define DECODE_TEST(name, opcode, sig) \