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

[wasm-gc] Make table type restrictions explicit

Bug: v8:7748
Change-Id: Ib5beeb55c3a9eba8fb23680e3845f80d55f3f154
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274633
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68646}
parent 9b5971d7
......@@ -749,7 +749,13 @@ class ModuleDecoderImpl : public Decoder {
if (!AddTable(module_.get())) break;
module_->tables.emplace_back();
WasmTable* table = &module_->tables.back();
const byte* type_position = pc();
table->type = consume_reference_type();
if (table->type.kind() != ValueType::kOptRef) {
// TODO(7748): Implement other table types.
error(type_position,
"Currently, only nullable references are allowed as table types");
}
uint8_t flags = validate_table_flags("table elements");
consume_resizable_limits(
"table elements", "elements", FLAG_wasm_max_table_size,
......
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