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

Unified Diff: src/compiler/mips64/instruction-selector-mips64.cc

Issue 1098863003: Import Reversed adapter from Chromium and use it in v8. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed feedback. Rebased. Created 5 years, 8 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/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/ppc/instruction-selector-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/mips64/instruction-selector-mips64.cc
diff --git a/src/compiler/mips64/instruction-selector-mips64.cc b/src/compiler/mips64/instruction-selector-mips64.cc
index dd7640ae7f2b650becfbb73297d90a9f9aa9979e..5b32e10ee04f94cb8ce2409ead221d0da2f9119a 100644
--- a/src/compiler/mips64/instruction-selector-mips64.cc
+++ b/src/compiler/mips64/instruction-selector-mips64.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "src/base/adapters.h"
#include "src/base/bits.h"
#include "src/compiler/instruction-selector-impl.h"
#include "src/compiler/node-matchers.h"
@@ -668,9 +669,8 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
g.TempImmediate(push_count << kPointerSizeLog2));
}
int slot = buffer.pushed_nodes.size() - 1;
- for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend();
- ++i) {
- Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(*i),
+ for (Node* node : base::Reversed(buffer.pushed_nodes)) {
+ Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(node),
g.TempImmediate(slot << kPointerSizeLog2));
slot--;
}
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/ppc/instruction-selector-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698