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

Unified Diff: src/compiler/ia32/instruction-selector-ia32.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: 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
Index: src/compiler/ia32/instruction-selector-ia32.cc
diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc
index 1eadc024f5c10817f939c669b024e0347a92b5e7..4c6e57059c991d375b3197fc99a4239d8c9b3fa6 100644
--- a/src/compiler/ia32/instruction-selector-ia32.cc
+++ b/src/compiler/ia32/instruction-selector-ia32.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"
@@ -831,13 +832,11 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
InitializeCallBuffer(node, &buffer, true, true);
// Push any stack arguments.
- for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend();
- ++i) {
+ for (auto i : base::Reversed(buffer.pushed_nodes)) {
Michael Starzinger 2015/04/20 13:11:14 nit: s/auto i/Node* node/
Sven Panne 2015/04/20 14:38:35 Done.
// TODO(titzer): handle pushing double parameters.
InstructionOperand value =
- g.CanBeImmediate(*i) ? g.UseImmediate(*i) : IsSupported(ATOM)
- ? g.UseRegister(*i)
- : g.Use(*i);
+ g.CanBeImmediate(i) ? g.UseImmediate(i)
+ : IsSupported(ATOM) ? g.UseRegister(i) : g.Use(i);
Emit(kIA32Push, g.NoOutput(), value);
}

Powered by Google App Engine
This is Rietveld 408576698