Commit 1f1710d1 authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[wasm][eh] Fix delegate opcode

Replace 0x16 with 0x18 for the delegate opcode, to avoid a conflict with
the function reference proposal.
See https://github.com/WebAssembly/exception-handling/issues/145

R=clemensb@chromium.org

Bug: v8:8091
Change-Id: Ib012f8680dfece200973e18fdf6c82877f10d5de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632604Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72118}
parent a90e9891
......@@ -44,10 +44,10 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(BrIf, 0x0d, _) \
V(BrTable, 0x0e, _) \
V(Return, 0x0f, _) \
V(Delegate, 0x16, _ /* eh_prototype */) \
V(Let, 0x17, _ /* typed_funcref prototype */) \
V(Delegate, 0x18, _ /* eh_prototype */) \
V(BrOnNull, 0xd4, _ /* gc prototype */) \
V(NopForTestingUnsupportedInLiftoff, 0x18, _)
V(NopForTestingUnsupportedInLiftoff, 0x19, _)
// Constants, locals, globals, and calls.
#define FOREACH_MISC_OPCODE(V) \
......
......@@ -11,7 +11,7 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
// Create a simple Wasm module.
function create_builder(i) {
const kExprNopForTestingUnsupportedInLiftoff = 0x18;
const kExprNopForTestingUnsupportedInLiftoff = 0x19;
const builder = new WasmModuleBuilder();
builder.addFunction('main', kSig_i_i)
.addBody([
......
......@@ -228,8 +228,8 @@ const kWasmOpcodes = {
'ReturnCallIndirect': 0x13,
'CallRef': 0x14,
'ReturnCallRef': 0x15,
'Delegate': 0x16,
'Let': 0x17,
'Delegate': 0x18,
'Drop': 0x1a,
'Select': 0x1b,
'SelectWithType': 0x1c,
......
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