OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 mode_ == DYNAMIC_GLOBAL || | 158 mode_ == DYNAMIC_GLOBAL || |
159 mode_ == DYNAMIC_LOCAL); | 159 mode_ == DYNAMIC_LOCAL); |
160 } | 160 } |
161 | 161 |
162 bool is_global() const; | 162 bool is_global() const; |
163 bool is_this() const { return kind_ == THIS; } | 163 bool is_this() const { return kind_ == THIS; } |
164 bool is_arguments() const { return kind_ == ARGUMENTS; } | 164 bool is_arguments() const { return kind_ == ARGUMENTS; } |
165 | 165 |
166 // True if the variable is named eval and not known to be shadowed. | 166 // True if the variable is named eval and not known to be shadowed. |
167 bool is_possibly_eval() const { | 167 bool is_possibly_eval() const { |
168 return IsVariable(Factory::eval_symbol()) && | 168 return IsVariable(FACTORY->eval_symbol()) && |
169 (mode_ == DYNAMIC || mode_ == DYNAMIC_GLOBAL); | 169 (mode_ == DYNAMIC || mode_ == DYNAMIC_GLOBAL); |
170 } | 170 } |
171 | 171 |
172 Variable* local_if_not_shadowed() const { | 172 Variable* local_if_not_shadowed() const { |
173 ASSERT(mode_ == DYNAMIC_LOCAL && local_if_not_shadowed_ != NULL); | 173 ASSERT(mode_ == DYNAMIC_LOCAL && local_if_not_shadowed_ != NULL); |
174 return local_if_not_shadowed_; | 174 return local_if_not_shadowed_; |
175 } | 175 } |
176 | 176 |
177 void set_local_if_not_shadowed(Variable* local) { | 177 void set_local_if_not_shadowed(Variable* local) { |
178 local_if_not_shadowed_ = local; | 178 local_if_not_shadowed_ = local; |
(...skipping 24 matching lines...) Expand all Loading... |
203 | 203 |
204 // Usage info. | 204 // Usage info. |
205 bool is_accessed_from_inner_scope_; // set by variable resolver | 205 bool is_accessed_from_inner_scope_; // set by variable resolver |
206 bool is_used_; | 206 bool is_used_; |
207 }; | 207 }; |
208 | 208 |
209 | 209 |
210 } } // namespace v8::internal | 210 } } // namespace v8::internal |
211 | 211 |
212 #endif // V8_VARIABLES_H_ | 212 #endif // V8_VARIABLES_H_ |
OLD | NEW |