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

Unified Diff: src/compiler/instruction-selector.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/ia32/instruction-selector-ia32.cc ('k') | src/compiler/liveness-analyzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index 4734e75aa8180f197d3e8abd828ba254c2edd3d7..8c94129713bd22696470d3dab36801b2b65b5cde 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -6,6 +6,7 @@
#include <limits>
+#include "src/base/adapters.h"
#include "src/compiler/instruction-selector-impl.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h"
@@ -465,9 +466,7 @@ void InstructionSelector::VisitBlock(BasicBlock* block) {
// Visit code in reverse control flow order, because architecture-specific
// matching may cover more than one node at a time.
- for (BasicBlock::reverse_iterator i = block->rbegin(); i != block->rend();
- ++i) {
- Node* node = *i;
+ for (auto node : base::Reversed(*block)) {
// Skip nodes that are unused or already defined.
if (!IsUsed(node) || IsDefined(node)) continue;
// Generate code for this node "top down", but schedule the code "bottom
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/liveness-analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698