OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 mode_ == CONST || | 127 mode_ == CONST || |
128 mode_ == CONST_HARMONY); | 128 mode_ == CONST_HARMONY); |
129 } | 129 } |
130 | 130 |
131 bool is_global() const; | 131 bool is_global() const; |
132 bool is_this() const { return kind_ == THIS; } | 132 bool is_this() const { return kind_ == THIS; } |
133 bool is_arguments() const { return kind_ == ARGUMENTS; } | 133 bool is_arguments() const { return kind_ == ARGUMENTS; } |
134 | 134 |
135 // True if the variable is named eval and not known to be shadowed. | 135 // True if the variable is named eval and not known to be shadowed. |
136 bool is_possibly_eval() const { | 136 bool is_possibly_eval() const { |
137 return IsVariable(FACTORY->eval_symbol()) && | 137 return IsVariable(FACTORY->eval_symbol()); |
138 (mode_ == DYNAMIC || mode_ == DYNAMIC_GLOBAL); | |
139 } | 138 } |
140 | 139 |
141 Variable* local_if_not_shadowed() const { | 140 Variable* local_if_not_shadowed() const { |
142 ASSERT(mode_ == DYNAMIC_LOCAL && local_if_not_shadowed_ != NULL); | 141 ASSERT(mode_ == DYNAMIC_LOCAL && local_if_not_shadowed_ != NULL); |
143 return local_if_not_shadowed_; | 142 return local_if_not_shadowed_; |
144 } | 143 } |
145 | 144 |
146 void set_local_if_not_shadowed(Variable* local) { | 145 void set_local_if_not_shadowed(Variable* local) { |
147 local_if_not_shadowed_ = local; | 146 local_if_not_shadowed_ = local; |
148 } | 147 } |
(...skipping 25 matching lines...) Expand all Loading... |
174 | 173 |
175 // Usage info. | 174 // Usage info. |
176 bool is_accessed_from_inner_scope_; // set by variable resolver | 175 bool is_accessed_from_inner_scope_; // set by variable resolver |
177 bool is_used_; | 176 bool is_used_; |
178 }; | 177 }; |
179 | 178 |
180 | 179 |
181 } } // namespace v8::internal | 180 } } // namespace v8::internal |
182 | 181 |
183 #endif // V8_VARIABLES_H_ | 182 #endif // V8_VARIABLES_H_ |
OLD | NEW |