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

Unified Diff: src/wasm/encoder.cc

Issue 2094573002: [wasm] Cleaning up code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/ast-decoder.cc ('k') | src/wasm/module-decoder.cc » ('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 c834ce61a4467559c22380a450429456f08116d5..ffd0294f6e78e793cec2848920d415368e19108c 100644
--- a/src/wasm/encoder.cc
+++ b/src/wasm/encoder.cc
@@ -87,7 +87,7 @@ void WasmFunctionBuilder::EmitSetLocal(uint32_t local_index) {
}
void WasmFunctionBuilder::EmitCode(const byte* code, uint32_t code_size) {
- for (size_t i = 0; i < code_size; i++) {
+ for (size_t i = 0; i < code_size; ++i) {
body_.push_back(code[i]);
}
}
@@ -129,7 +129,7 @@ void WasmFunctionBuilder::SetExported() { exported_ = true; }
void WasmFunctionBuilder::SetName(const char* name, int name_length) {
name_.clear();
if (name_length > 0) {
- for (int i = 0; i < name_length; i++) {
+ for (int i = 0; i < name_length; ++i) {
name_.push_back(*(name + i));
}
}
@@ -165,7 +165,7 @@ void WasmFunctionBuilder::WriteBody(ZoneBuffer& buffer) const {
WasmDataSegmentEncoder::WasmDataSegmentEncoder(Zone* zone, const byte* data,
uint32_t size, uint32_t dest)
: data_(zone), dest_(dest) {
- for (size_t i = 0; i < size; i++) {
+ for (size_t i = 0; i < size; ++i) {
data_.push_back(data[i]);
}
}
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | src/wasm/module-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698