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

Unified Diff: src/compiler/liveness-analyzer.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/instruction-selector.cc ('k') | src/compiler/mips/instruction-selector-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/liveness-analyzer.cc
diff --git a/src/compiler/liveness-analyzer.cc b/src/compiler/liveness-analyzer.cc
index 301106d1c3a4d5eff4d6553c8cfd7efafe6e6ab4..fe458b8f9fccf0557b1875b8e65190c3dfbd6a28 100644
--- a/src/compiler/liveness-analyzer.cc
+++ b/src/compiler/liveness-analyzer.cc
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/compiler/liveness-analyzer.h"
+#include "src/base/adapters.h"
#include "src/compiler/js-graph.h"
+#include "src/compiler/liveness-analyzer.h"
#include "src/compiler/node.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/state-values-utils.h"
@@ -97,8 +98,7 @@ void LivenessAnalyzerBlock::Process(BitVector* result,
// Copy the bitvector to the target bit vector.
result->CopyFrom(live_);
- for (auto i = entries_.rbegin(); i != entries_.rend(); i++) {
- auto entry = *i;
+ for (auto entry : base::Reversed(entries_)) {
switch (entry.kind()) {
case Entry::kLookup:
result->Add(entry.var());
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/mips/instruction-selector-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698