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

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: 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/scheduler.cc ('k') | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c00117e75690975738bdf3bfed5e06fe33addd30..e0e97acfce5c4ed181ec86efd00639c1f263300b 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,12 @@ 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 (Node* node : base::Reversed(buffer.pushed_nodes)) {
// TODO(titzer): handle pushing double parameters.
InstructionOperand value =
- g.CanBeImmediate(*i) ? g.UseImmediate(*i) : IsSupported(ATOM)
- ? g.UseRegister(*i)
- : g.Use(*i);
+ g.CanBeImmediate(node)
+ ? g.UseImmediate(node)
+ : IsSupported(ATOM) ? g.UseRegister(node) : g.Use(node);
Emit(kX64Push, g.NoOutput(), value);
}
« no previous file with comments | « src/compiler/scheduler.cc ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698