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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 bool is_accessed_from_inner_scope() const { | 139 bool is_accessed_from_inner_scope() const { |
140 return is_accessed_from_inner_scope_; | 140 return is_accessed_from_inner_scope_; |
141 } | 141 } |
142 bool is_used() { return is_used_; } | 142 bool is_used() { return is_used_; } |
143 void set_is_used(bool flag) { is_used_ = flag; } | 143 void set_is_used(bool flag) { is_used_ = flag; } |
144 | 144 |
145 bool IsVariable(Handle<String> n) const { | 145 bool IsVariable(Handle<String> n) const { |
146 return !is_this() && name().is_identical_to(n); | 146 return !is_this() && name().is_identical_to(n); |
147 } | 147 } |
148 | 148 |
| 149 bool IsStackAllocated() const; |
| 150 |
149 bool is_dynamic() const { | 151 bool is_dynamic() const { |
150 return (mode_ == DYNAMIC || | 152 return (mode_ == DYNAMIC || |
151 mode_ == DYNAMIC_GLOBAL || | 153 mode_ == DYNAMIC_GLOBAL || |
152 mode_ == DYNAMIC_LOCAL); | 154 mode_ == DYNAMIC_LOCAL); |
153 } | 155 } |
154 | 156 |
155 bool is_global() const; | 157 bool is_global() const; |
156 bool is_this() const { return kind_ == THIS; } | 158 bool is_this() const { return kind_ == THIS; } |
157 bool is_arguments() const { return kind_ == ARGUMENTS; } | 159 bool is_arguments() const { return kind_ == ARGUMENTS; } |
158 | 160 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 // rewrite_ is usually a Slot or a Property, but may be any expression. | 198 // rewrite_ is usually a Slot or a Property, but may be any expression. |
197 Expression* rewrite_; | 199 Expression* rewrite_; |
198 | 200 |
199 friend class Scope; // Has explicit access to rewrite_. | 201 friend class Scope; // Has explicit access to rewrite_. |
200 }; | 202 }; |
201 | 203 |
202 | 204 |
203 } } // namespace v8::internal | 205 } } // namespace v8::internal |
204 | 206 |
205 #endif // V8_VARIABLES_H_ | 207 #endif // V8_VARIABLES_H_ |
OLD | NEW |