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

Unified Diff: src/wasm/switch-logic.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/module-decoder.cc ('k') | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/switch-logic.cc
diff --git a/src/wasm/switch-logic.cc b/src/wasm/switch-logic.cc
index f8e3f0d3c2fbeab3a9cfc72cf0fd14772a04f4b4..9ebc0b3452d25aabd4bd9f31fa278c8a2ffdea34 100644
--- a/src/wasm/switch-logic.cc
+++ b/src/wasm/switch-logic.cc
@@ -34,7 +34,7 @@ CaseNode* OrderCases(ZoneVector<int>* cases, Zone* zone) {
}
std::sort(cases->begin(), cases->end());
ZoneVector<size_t> table_breaks(zone);
- for (size_t i = 1; i < cases->size(); i++) {
+ for (size_t i = 1; i < cases->size(); ++i) {
if (cases->at(i) - cases->at(i - 1) > max_distance) {
table_breaks.push_back(i);
}
@@ -42,7 +42,7 @@ CaseNode* OrderCases(ZoneVector<int>* cases, Zone* zone) {
table_breaks.push_back(cases->size());
ZoneVector<CaseNode*> nodes(zone);
size_t curr_pos = 0;
- for (size_t i = 0; i < table_breaks.size(); i++) {
+ for (size_t i = 0; i < table_breaks.size(); ++i) {
size_t break_pos = table_breaks[i];
if (break_pos - curr_pos >= min_size) {
int begin = cases->at(curr_pos);
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698