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

Unified Diff: src/hydrogen.h

Issue 6647018: Remove class HSubgraph. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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 | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 5be839b62fdb4e062a04b11f1e016c3565d1eb0a..b359db3f7dd3a4dffe5207e796e54b988d06fce8 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -192,40 +192,13 @@ class HLoopInformation: public ZoneObject {
};
-class HSubgraph: public ZoneObject {
- public:
- explicit HSubgraph(HGraph* graph)
- : graph_(graph),
- entry_block_(NULL),
- exit_block_(NULL) {
- }
-
- HGraph* graph() const { return graph_; }
- HBasicBlock* entry_block() const { return entry_block_; }
- HBasicBlock* exit_block() const { return exit_block_; }
- void set_exit_block(HBasicBlock* block) {
- exit_block_ = block;
- }
-
- void Initialize(HBasicBlock* block) {
- ASSERT(entry_block_ == NULL);
- entry_block_ = block;
- exit_block_ = block;
- }
-
- protected:
- HGraph* graph_; // The graph this is a subgraph of.
- HBasicBlock* entry_block_;
- HBasicBlock* exit_block_;
-};
-
-
-class HGraph: public HSubgraph {
+class HGraph: public ZoneObject {
public:
explicit HGraph(CompilationInfo* info);
const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; }
const ZoneList<HPhi*>* phi_list() const { return phi_list_; }
+ HBasicBlock* entry_block() const { return entry_block_; }
HEnvironment* start_environment() const { return start_environment_; }
void InitializeInferredTypes();
@@ -304,6 +277,7 @@ class HGraph: public HSubgraph {
void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor);
int next_block_id_;
+ HBasicBlock* entry_block_;
HEnvironment* start_environment_;
ZoneList<HBasicBlock*> blocks_;
ZoneList<HValue*> values_;
@@ -315,8 +289,6 @@ class HGraph: public HSubgraph {
SetOncePointer<HConstant> constant_false_;
SetOncePointer<HArgumentsObject> arguments_object_;
- friend class HSubgraph;
-
DISALLOW_COPY_AND_ASSIGN(HGraph);
};
@@ -643,7 +615,7 @@ class HGraphBuilder: public AstVisitor {
ast_context_(NULL),
break_scope_(NULL),
graph_(NULL),
- current_subgraph_(NULL),
+ current_block_(NULL),
inlined_count_(0) {
// This is not initialized in the initializer list because the
// constructor for the initial state relies on function_state_ == NULL
@@ -655,14 +627,11 @@ class HGraphBuilder: public AstVisitor {
// Simple accessors.
HGraph* graph() const { return graph_; }
- HSubgraph* subgraph() const { return current_subgraph_; }
BreakAndContinueScope* break_scope() const { return break_scope_; }
void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; }
- HBasicBlock* current_block() const { return subgraph()->exit_block(); }
- void set_current_block(HBasicBlock* block) {
- subgraph()->set_exit_block(block);
- }
+ HBasicBlock* current_block() const { return current_block_; }
+ void set_current_block(HBasicBlock* block) { current_block_ = block; }
HEnvironment* environment() const {
return current_block()->last_environment();
}
@@ -753,10 +722,6 @@ class HGraphBuilder: public AstVisitor {
HBasicBlock* exit_block,
HBasicBlock* continue_block);
- void AddToSubgraph(HSubgraph* graph, ZoneList<Statement*>* stmts);
- void AddToSubgraph(HSubgraph* graph, Statement* stmt);
- void AddToSubgraph(HSubgraph* graph, Expression* expr);
-
HValue* Top() const { return environment()->Top(); }
void Drop(int n) { environment()->Drop(n); }
void Bind(Variable* var, HValue* value) { environment()->Bind(var, value); }
@@ -908,7 +873,7 @@ class HGraphBuilder: public AstVisitor {
BreakAndContinueScope* break_scope_;
HGraph* graph_;
- HSubgraph* current_subgraph_;
+ HBasicBlock* current_block_;
int inlined_count_;
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698