Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: src/wasm/wasm-opcodes.h

Issue 2051043002: Implement Wasm GrowMemory opcode as a wasm runtime call (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review changes Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | src/wasm/wasm-opcodes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-opcodes.h
diff --git a/src/wasm/wasm-opcodes.h b/src/wasm/wasm-opcodes.h
index b29e4a0fea83d8b9f9d9528b7ad20d7c7cc4b1d1..b4aaed130c50075d46ee91997d3177ea787a705f 100644
--- a/src/wasm/wasm-opcodes.h
+++ b/src/wasm/wasm-opcodes.h
@@ -116,9 +116,10 @@ const WasmCodePosition kNoCodePosition = -1;
V(F32StoreMem, 0x35, f_if) \
V(F64StoreMem, 0x36, d_id)
+#define FOREACH_SIMPLE_MEM_OPCODE(V) V(GrowMemory, 0x39, i_i)
+
// Load memory expressions.
#define FOREACH_MISC_MEM_OPCODE(V) \
- V(GrowMemory, 0x39, i_i) \
V(MemorySize, 0x3b, i_v)
// Expressions with signatures.
@@ -410,6 +411,7 @@ const WasmCodePosition kNoCodePosition = -1;
FOREACH_CONTROL_OPCODE(V) \
FOREACH_MISC_OPCODE(V) \
FOREACH_SIMPLE_OPCODE(V) \
+ FOREACH_SIMPLE_MEM_OPCODE(V) \
FOREACH_STORE_MEM_OPCODE(V) \
FOREACH_LOAD_MEM_OPCODE(V) \
FOREACH_MISC_MEM_OPCODE(V) \
@@ -468,14 +470,15 @@ enum WasmOpcode {
// The reason for a trap.
#define FOREACH_WASM_TRAPREASON(V) \
- V(TrapUnreachable) \
- V(TrapMemOutOfBounds) \
- V(TrapDivByZero) \
- V(TrapDivUnrepresentable) \
- V(TrapRemByZero) \
- V(TrapFloatUnrepresentable) \
- V(TrapFuncInvalid) \
- V(TrapFuncSigMismatch)
+ V(TrapUnreachable) \
+ V(TrapMemOutOfBounds) \
+ V(TrapDivByZero) \
+ V(TrapDivUnrepresentable) \
+ V(TrapRemByZero) \
+ V(TrapFloatUnrepresentable) \
+ V(TrapFuncInvalid) \
+ V(TrapFuncSigMismatch) \
+ V(TrapMemAllocationFail)
enum TrapReason {
#define DECLARE_ENUM(name) k##name,
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | src/wasm/wasm-opcodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698