[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/+/2714702
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72973}
This commit is contained in:
Manos Koukoutos 2021-02-23 12:58:00 +00:00 committed by Commit Bot
parent 55fe15dc17
commit c2e98b65da
5 changed files with 8 additions and 11 deletions

View File

@ -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:

View File

@ -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);

View File

@ -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)

View File

@ -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.

View File

@ -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) {