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

Unified Diff: src/wasm/wasm-module-builder.cc

Issue 2694633003: [wasm] Rename EmitVarInt to EmitVarUint (Closed)
Patch Set: Created 3 years, 10 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-builder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module-builder.cc
diff --git a/src/wasm/wasm-module-builder.cc b/src/wasm/wasm-module-builder.cc
index d61a2f8f559759077be7bb75ce676a7ad0606e75..6458e06797ef0e67170aede5e1744e28c203ac7c 100644
--- a/src/wasm/wasm-module-builder.cc
+++ b/src/wasm/wasm-module-builder.cc
@@ -62,7 +62,7 @@ WasmFunctionBuilder::WasmFunctionBuilder(WasmModuleBuilder* builder)
direct_calls_(builder->zone()),
asm_offsets_(builder->zone(), 8) {}
-void WasmFunctionBuilder::EmitVarInt(uint32_t val) {
+void WasmFunctionBuilder::EmitVarUint(uint32_t val) {
byte buffer[8];
byte* ptr = buffer;
LEBHelper::write_u32v(&ptr, val);
@@ -83,15 +83,15 @@ uint32_t WasmFunctionBuilder::AddLocal(ValueType type) {
}
void WasmFunctionBuilder::EmitGetLocal(uint32_t local_index) {
- EmitWithVarInt(kExprGetLocal, local_index);
+ EmitWithVarUint(kExprGetLocal, local_index);
}
void WasmFunctionBuilder::EmitSetLocal(uint32_t local_index) {
- EmitWithVarInt(kExprSetLocal, local_index);
+ EmitWithVarUint(kExprSetLocal, local_index);
}
void WasmFunctionBuilder::EmitTeeLocal(uint32_t local_index) {
- EmitWithVarInt(kExprTeeLocal, local_index);
+ EmitWithVarUint(kExprTeeLocal, local_index);
}
void WasmFunctionBuilder::EmitCode(const byte* code, uint32_t code_size) {
@@ -116,10 +116,10 @@ void WasmFunctionBuilder::EmitWithU8U8(WasmOpcode opcode, const byte imm1,
body_.push_back(imm2);
}
-void WasmFunctionBuilder::EmitWithVarInt(WasmOpcode opcode,
- uint32_t immediate) {
+void WasmFunctionBuilder::EmitWithVarUint(WasmOpcode opcode,
+ uint32_t immediate) {
body_.push_back(static_cast<byte>(opcode));
- EmitVarInt(immediate);
+ EmitVarUint(immediate);
}
void WasmFunctionBuilder::EmitI32Const(int32_t value) {
« no previous file with comments | « src/wasm/wasm-module-builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698