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

Unified Diff: src/data-flow.h

Issue 1132005: Add iterative primitive type analysis.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 | « src/compiler.cc ('k') | src/data-flow.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/data-flow.h
===================================================================
--- src/data-flow.h (revision 4210)
+++ src/data-flow.h (working copy)
@@ -305,6 +305,8 @@
bool is_empty() { return instructions_.is_empty(); }
+ ZoneList<AstNode*>* instructions() { return &instructions_; }
+
void AddPredecessor(Node* predecessor) {
ASSERT(predecessor_ == NULL && predecessor != NULL);
predecessor_ = predecessor;
@@ -620,6 +622,31 @@
};
+
+class TypeAnalyzer BASE_EMBEDDED {
+ public:
+ TypeAnalyzer(ZoneList<Node*>* postorder,
+ ZoneList<Expression*>* body_definitions,
+ int variable_count,
+ int param_count)
+ : postorder_(postorder),
+ body_definitions_(body_definitions),
+ variable_count_(variable_count),
+ param_count_(param_count) {}
+
+ void Compute();
+
+ private:
+ // Get the primitity of definition number i. Definitions are numbered
+ // by the flow graph builder.
+ bool IsPrimitiveDef(int def_num);
+
+ ZoneList<Node*>* postorder_;
+ ZoneList<Expression*>* body_definitions_;
+ int variable_count_;
+ int param_count_;
+};
+
} } // namespace v8::internal
« no previous file with comments | « src/compiler.cc ('k') | src/data-flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698