2023-03-30 12:11:08 +02:00
|
|
|
// Copyright 2023 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2024-03-30 09:54:35 +01:00
|
|
|
// Flags: --no-wasm-lazy-compilation
|
2023-03-30 12:11:08 +02:00
|
|
|
|
|
|
|
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
|
|
|
|
|
|
|
|
const builder = new WasmModuleBuilder();
|
|
|
|
builder.addFunction(undefined, kSig_v_v)
|
|
|
|
.addBodyWithEnd([
|
|
|
|
// Invalid (overly long) GC opcode.
|
|
|
|
kGCPrefix, 0xff, 0xff, 0x7f
|
|
|
|
]);
|
|
|
|
assertThrows(
|
|
|
|
() => builder.toModule(), WebAssembly.CompileError,
|
|
|
|
/Invalid prefixed opcode/);
|