Commit c2e98b65 authored by Manos Koukoutos's avatar Manos Koukoutos Committed by Commit Bot

[wasm-gc] Fix/Clarify some TODOs

Functional change: Allow rtts as exception values.
Additional change: Remove liftoff subtyping TODO in anticipation of
removal of full ValueType usage in Liftoff.

Bug: v8:7748
Change-Id: I676a7fa6417d6e86bb148b4f5b9b086cc704928e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2714702Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72973}
parent 55fe15dc
...@@ -2356,11 +2356,11 @@ Node* WasmGraphBuilder::Throw(uint32_t exception_index, ...@@ -2356,11 +2356,11 @@ Node* WasmGraphBuilder::Throw(uint32_t exception_index,
break; break;
case wasm::kRef: case wasm::kRef:
case wasm::kOptRef: case wasm::kOptRef:
case wasm::kRtt:
case wasm::kRttWithDepth:
STORE_FIXED_ARRAY_SLOT_ANY(values_array, index, value); STORE_FIXED_ARRAY_SLOT_ANY(values_array, index, value);
++index; ++index;
break; break;
case wasm::kRtt: // TODO(7748): Implement.
case wasm::kRttWithDepth:
case wasm::kI8: case wasm::kI8:
case wasm::kI16: case wasm::kI16:
case wasm::kStmt: case wasm::kStmt:
...@@ -2493,11 +2493,11 @@ Node* WasmGraphBuilder::GetExceptionValues(Node* except_obj, ...@@ -2493,11 +2493,11 @@ Node* WasmGraphBuilder::GetExceptionValues(Node* except_obj,
break; break;
case wasm::kRef: case wasm::kRef:
case wasm::kOptRef: case wasm::kOptRef:
case wasm::kRtt:
case wasm::kRttWithDepth:
value = LOAD_FIXED_ARRAY_SLOT_ANY(values_array, index); value = LOAD_FIXED_ARRAY_SLOT_ANY(values_array, index);
++index; ++index;
break; break;
case wasm::kRtt: // TODO(7748): Implement.
case wasm::kRttWithDepth:
case wasm::kI8: case wasm::kI8:
case wasm::kI16: case wasm::kI16:
case wasm::kStmt: case wasm::kStmt:
......
...@@ -98,7 +98,6 @@ class StackTransferRecipe { ...@@ -98,7 +98,6 @@ class StackTransferRecipe {
// edges), we only care that pointer types stay amongst pointer types. // edges), we only care that pointer types stay amongst pointer types.
// It's fine if ref/optref overwrite each other. // It's fine if ref/optref overwrite each other.
DCHECK(src.is_object_reference_type()); DCHECK(src.is_object_reference_type());
// TODO(7748): Check that one type is subtype of the other?
} else { } else {
// All other types (primitive numbers, RTTs, bottom/stmt) must be equal. // All other types (primitive numbers, RTTs, bottom/stmt) must be equal.
DCHECK_EQ(dst, src); DCHECK_EQ(dst, src);
......
...@@ -130,8 +130,7 @@ ACCESSORS(WasmGlobalObject, untagged_buffer, JSArrayBuffer, ...@@ -130,8 +130,7 @@ ACCESSORS(WasmGlobalObject, untagged_buffer, JSArrayBuffer,
kUntaggedBufferOffset) kUntaggedBufferOffset)
ACCESSORS(WasmGlobalObject, tagged_buffer, FixedArray, kTaggedBufferOffset) ACCESSORS(WasmGlobalObject, tagged_buffer, FixedArray, kTaggedBufferOffset)
SMI_ACCESSORS(WasmGlobalObject, offset, kOffsetOffset) SMI_ACCESSORS(WasmGlobalObject, offset, kOffsetOffset)
// TODO(7748): This will not suffice to hold the 32-bit encoding of a ValueType. // TODO(7748): Try to come up with some encoding that includes is_mutable?
// We need to devise and encoding that does, and also encodes is_mutable.
SMI_ACCESSORS(WasmGlobalObject, raw_type, kRawTypeOffset) SMI_ACCESSORS(WasmGlobalObject, raw_type, kRawTypeOffset)
SMI_ACCESSORS(WasmGlobalObject, is_mutable, kIsMutableOffset) SMI_ACCESSORS(WasmGlobalObject, is_mutable, kIsMutableOffset)
......
...@@ -339,8 +339,8 @@ class WasmGlobalObject : public JSObject { ...@@ -339,8 +339,8 @@ class WasmGlobalObject : public JSObject {
DECL_INT32_ACCESSORS(offset) DECL_INT32_ACCESSORS(offset)
DECL_INT_ACCESSORS(raw_type) DECL_INT_ACCESSORS(raw_type)
DECL_PRIMITIVE_ACCESSORS(type, wasm::ValueType) DECL_PRIMITIVE_ACCESSORS(type, wasm::ValueType)
// TODO(7748): Once we improve the encoding of mutability/type, turn this back // TODO(7748): If we encode mutability in raw_type, turn this into a boolean
// into a boolean accessor. // accessor.
DECL_INT_ACCESSORS(is_mutable) DECL_INT_ACCESSORS(is_mutable)
// Dispatched behavior. // Dispatched behavior.
......
...@@ -258,8 +258,7 @@ bool ArrayIsSubtypeOf(uint32_t subtype_index, uint32_t supertype_index, ...@@ -258,8 +258,7 @@ bool ArrayIsSubtypeOf(uint32_t subtype_index, uint32_t supertype_index,
} }
} }
// TODO(7748): Expand this with function subtyping once the hiccups // TODO(7748): Expand this with function subtyping when it is introduced.
// with 'exact types' have been cleared.
bool FunctionIsSubtypeOf(uint32_t subtype_index, uint32_t supertype_index, bool FunctionIsSubtypeOf(uint32_t subtype_index, uint32_t supertype_index,
const WasmModule* sub_module, const WasmModule* sub_module,
const WasmModule* super_module) { const WasmModule* super_module) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment