Index: src/hydrogen.h |
diff --git a/src/hydrogen.h b/src/hydrogen.h |
index 8a5e8df7cd9c624ac17e293291f8d0c58a7a56d0..e6e3a020c08c7841540003f5b54672e4724cd624 100644 |
--- a/src/hydrogen.h |
+++ b/src/hydrogen.h |
@@ -200,13 +200,12 @@ class HSubgraph: public ZoneObject { |
} |
HGraph* graph() const { return graph_; } |
- HEnvironment* environment() const { |
- ASSERT(HasExit()); |
- return exit_block_->last_environment(); |
+ HBasicBlock* entry_block() const { return entry_block_; } |
+ HBasicBlock* exit_block() const { return exit_block_; } |
+ void set_exit_block(HBasicBlock* block) { |
+ exit_block_ = block; |
} |
- bool HasExit() const { return exit_block_ != NULL; } |
- |
void PreProcessOsrEntry(IterationStatement* statement); |
void AppendJoin(HSubgraph* then_graph, HSubgraph* else_graph, AstNode* node); |
@@ -237,17 +236,6 @@ class HSubgraph: public ZoneObject { |
entry_block_ = block; |
exit_block_ = block; |
} |
- HBasicBlock* entry_block() const { return entry_block_; } |
- HBasicBlock* exit_block() const { return exit_block_; } |
- void set_exit_block(HBasicBlock* block) { |
- exit_block_ = block; |
- } |
- |
- void ConnectExitTo(HBasicBlock* other, bool include_stack_check = false) { |
- if (HasExit()) { |
- exit_block()->Goto(other, include_stack_check); |
- } |
- } |
protected: |
HGraph* graph_; // The graph this is a subgraph of. |
@@ -657,8 +645,13 @@ class HGraphBuilder: public AstVisitor { |
BreakAndContinueScope* break_scope() const { return break_scope_; } |
void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } |
- HEnvironment* environment() const { return subgraph()->environment(); } |
- HBasicBlock* CurrentBlock() const { return subgraph()->exit_block(); } |
+ HBasicBlock* current_block() const { return subgraph()->exit_block(); } |
+ void set_current_block(HBasicBlock* block) { |
+ subgraph()->set_exit_block(block); |
+ } |
+ HEnvironment* environment() const { |
+ return current_block()->last_environment(); |
+ } |
// Adding instructions. |
HInstruction* AddInstruction(HInstruction* instr); |