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

Unified Diff: src/ast.h

Issue 603004: Add last use data flow information to the fast code generator.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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/data-flow.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
===================================================================
--- src/ast.h (revision 3827)
+++ src/ast.h (working copy)
@@ -102,6 +102,7 @@
// Forward declarations
class TargetCollector;
class MaterializedLiteral;
+class DefinitionInfo;
#define DEF_FORWARD_DECLARATION(type) class type;
AST_NODE_LIST(DEF_FORWARD_DECLARATION)
@@ -182,7 +183,7 @@
static const int kNoLabel = -1;
- Expression() : num_(kNoLabel) {}
+ Expression() : num_(kNoLabel), def_(NULL), defined_vars_(NULL) {}
virtual Expression* AsExpression() { return this; }
@@ -211,9 +212,20 @@
// AST node numbering ordered by evaluation order.
void set_num(int n) { num_ = n; }
+ // Data flow information.
+ DefinitionInfo* var_def() { return def_; }
+ void set_var_def(DefinitionInfo* def) { def_ = def; }
+
+ ZoneList<DefinitionInfo*>* defined_vars() { return defined_vars_; }
+ void set_defined_vars(ZoneList<DefinitionInfo*>* defined_vars) {
+ defined_vars_ = defined_vars;
+ }
+
private:
StaticType type_;
int num_;
+ DefinitionInfo* def_;
+ ZoneList<DefinitionInfo*>* defined_vars_;
};
« no previous file with comments | « no previous file | src/data-flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698