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

Unified Diff: vm/flow_graph.cc

Issue 11348026: - GrowableArray::RemoveLast returns the value being removed (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 2 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 | « no previous file | vm/flow_graph_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/flow_graph.cc
===================================================================
--- vm/flow_graph.cc (revision 14219)
+++ vm/flow_graph.cc (working copy)
@@ -475,8 +475,7 @@
}
while (!worklist.is_empty()) {
- BlockEntryInstr* current = worklist.Last();
- worklist.RemoveLast();
+ BlockEntryInstr* current = worklist.RemoveLast();
// Ensure a phi for each block in the dominance frontier of current.
for (BitVector::Iterator it(dom_frontier[current->preorder_number()]);
!it.Done();
@@ -584,8 +583,7 @@
// Update expression stack.
ASSERT(env->length() > variable_count());
- Definition* reaching_defn = env->Last();
- env->RemoveLast();
+ Definition* reaching_defn = env->RemoveLast();
Definition* input_defn = v->definition();
if (input_defn->IsLoadLocal() || input_defn->IsStoreLocal()) {
@@ -682,8 +680,7 @@
void FlowGraph::MarkLivePhis(GrowableArray<PhiInstr*>* live_phis) {
while (!live_phis->is_empty()) {
- PhiInstr* phi = live_phis->Last();
- live_phis->RemoveLast();
+ PhiInstr* phi = live_phis->RemoveLast();
for (intptr_t i = 0; i < phi->InputCount(); i++) {
Value* val = phi->InputAt(i);
PhiInstr* used_phi = val->definition()->AsPhi();
@@ -712,8 +709,7 @@
}
while (!stack.is_empty()) {
- BlockEntryInstr* p = stack.Last();
- stack.RemoveLast();
+ BlockEntryInstr* p = stack.RemoveLast();
for (intptr_t i = 0; i < p->PredecessorCount(); ++i) {
BlockEntryInstr* q = p->PredecessorAt(i);
if (!loop->Contains(q->preorder_number())) {
« no previous file with comments | « no previous file | vm/flow_graph_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698