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

Unified Diff: src/compiler/ppc/instruction-selector-ppc.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/mips64/instruction-selector-mips64.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ppc/instruction-selector-ppc.cc
diff --git a/src/compiler/ppc/instruction-selector-ppc.cc b/src/compiler/ppc/instruction-selector-ppc.cc
index c2c4de0f2101cb46398d2f1aebfe316bbb6c012d..46516e47cacd57dbb215dbd5395a45ef05521ee9 100644
--- a/src/compiler/ppc/instruction-selector-ppc.cc
+++ b/src/compiler/ppc/instruction-selector-ppc.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/compiler/instruction-selector-impl.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h"
@@ -1453,9 +1454,8 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
// Push any stack arguments.
// TODO(mbrandy): reverse order and use push only for first
- for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend();
- i++) {
- Emit(kPPC_Push, g.NoOutput(), g.UseRegister(*i));
+ for (Node* node : base::Reversed(buffer.pushed_nodes)) {
+ Emit(kPPC_Push, g.NoOutput(), g.UseRegister(node));
}
// Pass label of exception handler block.
« no previous file with comments | « src/compiler/mips64/instruction-selector-mips64.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698