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

Unified Diff: src/compiler/schedule.h

Issue 484653002: Finish TODO in Schedule. s/entry/start/g and s/exit/end/g to be more regular. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/raw-machine-assembler.cc ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/schedule.h
diff --git a/src/compiler/schedule.h b/src/compiler/schedule.h
index e730f3324caba9e81c69a89f68b09fe6c7031323..b9bb526a2c38c87f2f315cbf122bbdf95e13e556 100644
--- a/src/compiler/schedule.h
+++ b/src/compiler/schedule.h
@@ -163,16 +163,10 @@ class Schedule : public GenericGraph<BasicBlock> {
nodeid_to_block_(BasicBlockVector::allocator_type(zone)),
rpo_order_(BasicBlockVector::allocator_type(zone)),
immediate_dominator_(BasicBlockVector::allocator_type(zone)) {
- NewBasicBlock(); // entry.
- NewBasicBlock(); // exit.
- SetStart(entry());
- SetEnd(exit());
+ SetStart(NewBasicBlock()); // entry.
+ SetEnd(NewBasicBlock()); // exit.
}
- // TODO(titzer): rewrite users of these methods to use start() and end().
- BasicBlock* entry() const { return all_blocks_[0]; } // Return entry block.
- BasicBlock* exit() const { return all_blocks_[1]; } // Return exit block.
-
// Return the block which contains {node}, if any.
BasicBlock* block(Node* node) const {
if (node->id() < static_cast<NodeId>(nodeid_to_block_.size())) {
@@ -273,7 +267,7 @@ class Schedule : public GenericGraph<BasicBlock> {
DCHECK(block->control_ == BasicBlock::kNone);
block->control_ = BasicBlock::kReturn;
SetControlInput(block, input);
- if (block != exit()) AddSuccessor(block, exit());
+ if (block != end()) AddSuccessor(block, end());
}
// BasicBlock building: add a throw at the end of {block}.
@@ -281,7 +275,7 @@ class Schedule : public GenericGraph<BasicBlock> {
DCHECK(block->control_ == BasicBlock::kNone);
block->control_ = BasicBlock::kThrow;
SetControlInput(block, input);
- if (block != exit()) AddSuccessor(block, exit());
+ if (block != end()) AddSuccessor(block, end());
}
// BasicBlock building: add a deopt at the end of {block}.
@@ -290,7 +284,7 @@ class Schedule : public GenericGraph<BasicBlock> {
block->control_ = BasicBlock::kDeoptimize;
SetControlInput(block, state);
block->deferred_ = true; // By default, consider deopts the slow path.
- if (block != exit()) AddSuccessor(block, exit());
+ if (block != end()) AddSuccessor(block, end());
}
friend class Scheduler;
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698