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

Side by Side Diff: src/ast.h

Issue 889003: Propagate reaching definitions to the instuctions of a block. (Closed)
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 unified diff | Download patch
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/data-flow.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 #define AST_NODE_LIST(V) \ 97 #define AST_NODE_LIST(V) \
98 V(Declaration) \ 98 V(Declaration) \
99 STATEMENT_NODE_LIST(V) \ 99 STATEMENT_NODE_LIST(V) \
100 EXPRESSION_NODE_LIST(V) 100 EXPRESSION_NODE_LIST(V)
101 101
102 // Forward declarations 102 // Forward declarations
103 class TargetCollector; 103 class TargetCollector;
104 class MaterializedLiteral; 104 class MaterializedLiteral;
105 class DefinitionInfo; 105 class DefinitionInfo;
106 class BitVector;
106 107
107 #define DEF_FORWARD_DECLARATION(type) class type; 108 #define DEF_FORWARD_DECLARATION(type) class type;
108 AST_NODE_LIST(DEF_FORWARD_DECLARATION) 109 AST_NODE_LIST(DEF_FORWARD_DECLARATION)
109 #undef DEF_FORWARD_DECLARATION 110 #undef DEF_FORWARD_DECLARATION
110 111
111 112
112 // Typedef only introduced to avoid unreadable code. 113 // Typedef only introduced to avoid unreadable code.
113 // Please do appreciate the required space in "> >". 114 // Please do appreciate the required space in "> >".
114 typedef ZoneList<Handle<String> > ZoneStringList; 115 typedef ZoneList<Handle<String> > ZoneStringList;
115 typedef ZoneList<Handle<Object> > ZoneObjectList; 116 typedef ZoneList<Handle<Object> > ZoneObjectList;
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 return (variable == NULL) ? false : variable->is_arguments(); 1026 return (variable == NULL) ? false : variable->is_arguments();
1026 } 1027 }
1027 1028
1028 Handle<String> name() const { return name_; } 1029 Handle<String> name() const { return name_; }
1029 Variable* var() const { return var_; } 1030 Variable* var() const { return var_; }
1030 bool is_this() const { return is_this_; } 1031 bool is_this() const { return is_this_; }
1031 bool inside_with() const { return inside_with_; } 1032 bool inside_with() const { return inside_with_; }
1032 bool is_trivial() { return is_trivial_; } 1033 bool is_trivial() { return is_trivial_; }
1033 void set_is_trivial(bool b) { is_trivial_ = b; } 1034 void set_is_trivial(bool b) { is_trivial_ = b; }
1034 1035
1036 BitVector* reaching_definitions() { return reaching_definitions_; }
1037 void set_reaching_definitions(BitVector* rd) { reaching_definitions_ = rd; }
1038
1035 // Bind this proxy to the variable var. 1039 // Bind this proxy to the variable var.
1036 void BindTo(Variable* var); 1040 void BindTo(Variable* var);
1037 1041
1038 protected: 1042 protected:
1039 Handle<String> name_; 1043 Handle<String> name_;
1040 Variable* var_; // resolved variable, or NULL 1044 Variable* var_; // resolved variable, or NULL
1041 bool is_this_; 1045 bool is_this_;
1042 bool inside_with_; 1046 bool inside_with_;
1043 bool is_trivial_; 1047 bool is_trivial_;
1048 BitVector* reaching_definitions_;
1044 1049
1045 VariableProxy(Handle<String> name, bool is_this, bool inside_with); 1050 VariableProxy(Handle<String> name, bool is_this, bool inside_with);
1046 explicit VariableProxy(bool is_this); 1051 explicit VariableProxy(bool is_this);
1047 1052
1048 friend class Scope; 1053 friend class Scope;
1049 }; 1054 };
1050 1055
1051 1056
1052 class VariableProxySentinel: public VariableProxy { 1057 class VariableProxySentinel: public VariableProxy {
1053 public: 1058 public:
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 #undef DEF_VISIT 1984 #undef DEF_VISIT
1980 1985
1981 private: 1986 private:
1982 bool stack_overflow_; 1987 bool stack_overflow_;
1983 }; 1988 };
1984 1989
1985 1990
1986 } } // namespace v8::internal 1991 } } // namespace v8::internal
1987 1992
1988 #endif // V8_AST_H_ 1993 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/data-flow.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698