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,
break;
case wasm::kRef:
case wasm::kOptRef:
case wasm::kRtt:
case wasm::kRttWithDepth:
STORE_FIXED_ARRAY_SLOT_ANY(values_array, index, value);
++index;
break;
case wasm::kRtt: // TODO(7748): Implement.
case wasm::kRttWithDepth:
case wasm::kI8:
case wasm::kI16:
case wasm::kStmt:
......@@ -2493,11 +2493,11 @@ Node* WasmGraphBuilder::GetExceptionValues(Node* except_obj,
break;
case wasm::kRef:
case wasm::kOptRef:
case wasm::kRtt:
case wasm::kRttWithDepth:
value = LOAD_FIXED_ARRAY_SLOT_ANY(values_array, index);
++index;
break;
case wasm::kRtt: // TODO(7748): Implement.
case wasm::kRttWithDepth:
case wasm::kI8:
case wasm::kI16:
case wasm::kStmt:
......
......@@ -98,7 +98,6 @@ class StackTransferRecipe {
// edges), we only care that pointer types stay amongst pointer types.
// It's fine if ref/optref overwrite each other.
DCHECK(src.is_object_reference_type());
// TODO(7748): Check that one type is subtype of the other?
} else {
// All other types (primitive numbers, RTTs, bottom/stmt) must be equal.
DCHECK_EQ(dst, src);
......
......@@ -130,8 +130,7 @@ ACCESSORS(WasmGlobalObject, untagged_buffer, JSArrayBuffer,
kUntaggedBufferOffset)
ACCESSORS(WasmGlobalObject, tagged_buffer, FixedArray, kTaggedBufferOffset)
SMI_ACCESSORS(WasmGlobalObject, offset, kOffsetOffset)
// TODO(7748): This will not suffice to hold the 32-bit encoding of a ValueType.
// We need to devise and encoding that does, and also encodes is_mutable.
// TODO(7748): Try to come up with some encoding that includes is_mutable?
SMI_ACCESSORS(WasmGlobalObject, raw_type, kRawTypeOffset)
SMI_ACCESSORS(WasmGlobalObject, is_mutable, kIsMutableOffset)
......
......@@ -339,8 +339,8 @@ class WasmGlobalObject : public JSObject {
DECL_INT32_ACCESSORS(offset)
DECL_INT_ACCESSORS(raw_type)
DECL_PRIMITIVE_ACCESSORS(type, wasm::ValueType)
// TODO(7748): Once we improve the encoding of mutability/type, turn this back
// into a boolean accessor.
// TODO(7748): If we encode mutability in raw_type, turn this into a boolean
// accessor.
DECL_INT_ACCESSORS(is_mutable)
// Dispatched behavior.
......
......@@ -258,8 +258,7 @@ bool ArrayIsSubtypeOf(uint32_t subtype_index, uint32_t supertype_index,
}
}
// TODO(7748): Expand this with function subtyping once the hiccups
// with 'exact types' have been cleared.
// TODO(7748): Expand this with function subtyping when it is introduced.
bool FunctionIsSubtypeOf(uint32_t subtype_index, uint32_t supertype_index,
const WasmModule* sub_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