[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: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#68646}
This commit is contained in:
parent
9b5971d76f
commit
b72e8d5fdf
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user