[test][wasm-gc] remove remaining rtt canon tests
Bug: v8:7748 Change-Id: I067e9d6a56dd58dbd0f45607f62b5ef36c69ff6f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776690 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Auto-Submit: Matthias Liedtke <mliedtke@google.com> Commit-Queue: Matthias Liedtke <mliedtke@google.com> Cr-Commit-Position: refs/heads/main@{#81888}
This commit is contained in:
parent
d180d40d28
commit
86da4f8f60
@ -1455,17 +1455,11 @@ WASM_COMPILED_EXEC_TEST(ArrayNewMap) {
|
||||
&sig, {},
|
||||
{WASM_ARRAY_NEW(type_index, WASM_I32V(10), WASM_I32V(42)), kExprEnd});
|
||||
|
||||
ValueType rtt_type = ValueType::Rtt(type_index);
|
||||
FunctionSig rtt_canon_sig(1, 0, &rtt_type);
|
||||
const byte kRttCanon = tester.DefineFunction(
|
||||
&rtt_canon_sig, {}, {WASM_RTT_CANON(type_index), kExprEnd});
|
||||
|
||||
tester.CompileModule();
|
||||
|
||||
Handle<Object> map = tester.GetResultObject(kRttCanon).ToHandleChecked();
|
||||
Handle<Object> result = tester.GetResultObject(array_new).ToHandleChecked();
|
||||
CHECK(result->IsWasmArray());
|
||||
CHECK_EQ(Handle<WasmArray>::cast(result)->map(), *map);
|
||||
CHECK_EQ(Handle<WasmArray>::cast(result)->map(),
|
||||
tester.instance()->managed_object_maps().get(type_index));
|
||||
}
|
||||
|
||||
WASM_COMPILED_EXEC_TEST(FunctionRefs) {
|
||||
@ -1483,11 +1477,6 @@ WASM_COMPILED_EXEC_TEST(FunctionRefs) {
|
||||
ValueType func_type = ValueType::RefNull(sig_index);
|
||||
FunctionSig sig_func(1, 0, &func_type);
|
||||
|
||||
ValueType rtt0 = ValueType::Rtt(sig_index);
|
||||
FunctionSig sig_rtt0(1, 0, &rtt0);
|
||||
const byte rtt_canon = tester.DefineFunction(
|
||||
&sig_rtt0, {}, {WASM_RTT_CANON(sig_index), kExprEnd});
|
||||
|
||||
const byte cast = tester.DefineFunction(
|
||||
&sig_func, {kWasmFuncRef},
|
||||
{WASM_LOCAL_SET(0, WASM_REF_FUNC(func_index)),
|
||||
@ -1508,12 +1497,6 @@ WASM_COMPILED_EXEC_TEST(FunctionRefs) {
|
||||
|
||||
tester.CompileModule();
|
||||
|
||||
Handle<Object> result_canon =
|
||||
tester.GetResultObject(rtt_canon).ToHandleChecked();
|
||||
CHECK(result_canon->IsMap());
|
||||
Handle<Map> map_canon = Handle<Map>::cast(result_canon);
|
||||
CHECK(map_canon->IsWasmInternalFunctionMap());
|
||||
|
||||
Handle<Object> result_cast = tester.GetResultObject(cast).ToHandleChecked();
|
||||
CHECK(result_cast->IsWasmInternalFunction());
|
||||
Handle<JSFunction> cast_function = Handle<JSFunction>::cast(
|
||||
|
@ -581,10 +581,6 @@ inline uint16_t ExtractPrefixedOpcodeBytes(WasmOpcode opcode) {
|
||||
__VA_ARGS__, WASM_GC_OP(kExprArrayNewFixedStatic), static_cast<byte>(index), \
|
||||
static_cast<byte>(length)
|
||||
|
||||
#define WASM_RTT(typeidx) kRttCode, U32V_1(typeidx)
|
||||
#define WASM_RTT_CANON(typeidx) \
|
||||
WASM_GC_OP(kExprRttCanon), static_cast<byte>(typeidx)
|
||||
|
||||
#define WASM_I31_NEW(val) val, WASM_GC_OP(kExprI31New)
|
||||
#define WASM_I31_GET_S(val) val, WASM_GC_OP(kExprI31GetS)
|
||||
#define WASM_I31_GET_U(val) val, WASM_GC_OP(kExprI31GetU)
|
||||
|
@ -154,12 +154,6 @@ function wasmRefType(heap_type) {
|
||||
return {opcode: kWasmRef, heap_type: heap_type};
|
||||
}
|
||||
|
||||
let kWasmRtt = 0x68;
|
||||
function wasmRtt(index) {
|
||||
if (index < 0) throw new Error("Expecting non-negative type index");
|
||||
return {opcode: kWasmRtt, index: index};
|
||||
}
|
||||
|
||||
let kExternalFunction = 0;
|
||||
let kExternalTable = 1;
|
||||
let kExternalMemory = 2;
|
||||
@ -496,9 +490,6 @@ let kExprArrayNewElemStatic = 0x1f;
|
||||
let kExprI31New = 0x20;
|
||||
let kExprI31GetS = 0x21;
|
||||
let kExprI31GetU = 0x22;
|
||||
let kExprRttCanon = 0x30;
|
||||
let kExprRttSub = 0x31;
|
||||
let kExprRttFreshSub = 0x32;
|
||||
let kExprRefTestStatic = 0x44;
|
||||
let kExprRefCastStatic = 0x45;
|
||||
let kExprBrOnCastStatic = 0x46;
|
||||
|
@ -4219,21 +4219,6 @@ TEST_F(FunctionBodyDecoderTest, PackedTypesAsLocals) {
|
||||
ExpectFailure(sigs.v_v(), {}, kAppendEnd, "invalid value type");
|
||||
}
|
||||
|
||||
TEST_F(FunctionBodyDecoderTest, RttCanon) {
|
||||
WASM_FEATURE_SCOPE(typed_funcref);
|
||||
WASM_FEATURE_SCOPE(gc);
|
||||
WASM_FEATURE_SCOPE(eh);
|
||||
|
||||
uint8_t array_type_index = builder.AddArray(kWasmI32, true);
|
||||
uint8_t struct_type_index = builder.AddStruct({F(kWasmI64, true)});
|
||||
|
||||
for (uint32_t type_index : {array_type_index, struct_type_index}) {
|
||||
ValueType rtt1 = ValueType::Rtt(type_index);
|
||||
FunctionSig sig1(1, 0, &rtt1);
|
||||
ExpectValidates(&sig1, {WASM_RTT_CANON(type_index)});
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(FunctionBodyDecoderTest, RefTestCast) {
|
||||
WASM_FEATURE_SCOPE(typed_funcref);
|
||||
WASM_FEATURE_SCOPE(gc);
|
||||
|
@ -784,33 +784,6 @@ TEST_F(WasmModuleVerifyTest, RefNullGlobalInvalid2) {
|
||||
"of type definitions supported by V8");
|
||||
}
|
||||
|
||||
TEST_F(WasmModuleVerifyTest, RttCanonGlobalStruct) {
|
||||
WASM_FEATURE_SCOPE(typed_funcref);
|
||||
WASM_FEATURE_SCOPE(gc);
|
||||
static const byte data[] = {
|
||||
SECTION(Type, ENTRY_COUNT(1),
|
||||
WASM_STRUCT_DEF(FIELD_COUNT(1), STRUCT_FIELD(kI32Code, true))),
|
||||
SECTION(Global, ENTRY_COUNT(1), WASM_RTT(0), 0, WASM_RTT_CANON(0),
|
||||
kExprEnd)};
|
||||
ModuleResult result = DecodeModule(data, data + sizeof(data));
|
||||
EXPECT_OK(result);
|
||||
}
|
||||
|
||||
TEST_F(WasmModuleVerifyTest, RttCanonGlobalTypeError) {
|
||||
WASM_FEATURE_SCOPE(typed_funcref);
|
||||
WASM_FEATURE_SCOPE(gc);
|
||||
static const byte data[] = {
|
||||
SECTION(Type, ENTRY_COUNT(2),
|
||||
WASM_STRUCT_DEF(FIELD_COUNT(1), STRUCT_FIELD(kI32Code, true)),
|
||||
WASM_STRUCT_DEF(FIELD_COUNT(1), STRUCT_FIELD(kI64Code, true))),
|
||||
SECTION(Global, ENTRY_COUNT(1), WASM_RTT(0), 1, WASM_RTT_CANON(1),
|
||||
kExprEnd)};
|
||||
ModuleResult result = DecodeModule(data, data + sizeof(data));
|
||||
EXPECT_NOT_OK(
|
||||
result,
|
||||
"type error in constant expression[0] (expected (rtt 0), got (rtt 1))");
|
||||
}
|
||||
|
||||
TEST_F(WasmModuleVerifyTest, StructNewInitExpr) {
|
||||
WASM_FEATURE_SCOPE(typed_funcref);
|
||||
WASM_FEATURE_SCOPE(gc);
|
||||
|
Loading…
Reference in New Issue
Block a user