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

Unified Diff: src/compiler/x64/instruction-selector-x64.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/x64/instruction-selector-x64.cc
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc
index 21db735b40176dd3ee76f935514e059c997322a7..ad68b16c3ad34b38a5edcf35ee261c8f75ffaf10 100644
--- a/src/compiler/x64/instruction-selector-x64.cc
+++ b/src/compiler/x64/instruction-selector-x64.cc
@@ -4,6 +4,7 @@
#include <algorithm>
+#include "src/base/adapters.h"
#include "src/compiler/instruction-selector-impl.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h"
@@ -1034,13 +1035,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(kX64Push, g.NoOutput(), value);
}
« src/compiler/scheduler.cc ('K') | « src/compiler/scheduler.cc ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698