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

Unified Diff: src/wasm/encoder.cc

Issue 1775123003: [wasm] Encode immediates to Load and Store as varint. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/encoder.h ('k') | src/wasm/wasm-macro-gen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/encoder.cc
diff --git a/src/wasm/encoder.cc b/src/wasm/encoder.cc
index 91624782af8f85350e524dcb7e464a6937621991..b65fc385dfa3fc2802fee7afd259061959e0e6fa 100644
--- a/src/wasm/encoder.cc
+++ b/src/wasm/encoder.cc
@@ -131,6 +131,13 @@ void WasmFunctionBuilder::EmitWithU8(WasmOpcode opcode, const byte immediate) {
body_.push_back(immediate);
}
+void WasmFunctionBuilder::EmitWithU8U8(WasmOpcode opcode, const byte imm1,
+ const byte imm2) {
+ body_.push_back(static_cast<byte>(opcode));
+ body_.push_back(imm1);
+ body_.push_back(imm2);
+}
+
void WasmFunctionBuilder::EmitWithVarInt(WasmOpcode opcode,
uint32_t immediate) {
body_.push_back(static_cast<byte>(opcode));
« no previous file with comments | « src/wasm/encoder.h ('k') | src/wasm/wasm-macro-gen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698