| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 bool IsValidLeftHandSide() { return is_valid_LHS_; } | 128 bool IsValidLeftHandSide() { return is_valid_LHS_; } |
| 129 | 129 |
| 130 // The source code for an eval() call may refer to a variable that is | 130 // The source code for an eval() call may refer to a variable that is |
| 131 // in an outer scope about which we don't know anything (it may not | 131 // in an outer scope about which we don't know anything (it may not |
| 132 // be the global scope). scope() is NULL in that case. Currently the | 132 // be the global scope). scope() is NULL in that case. Currently the |
| 133 // scope is only used to follow the context chain length. | 133 // scope is only used to follow the context chain length. |
| 134 Scope* scope() const { return scope_; } | 134 Scope* scope() const { return scope_; } |
| 135 | 135 |
| 136 Handle<String> name() const { return name_; } | 136 Handle<String> name() const { return name_; } |
| 137 Mode mode() const { return mode_; } | 137 Mode mode() const { return mode_; } |
| 138 void set_mode(Mode mode) { mode_ = mode; } |
| 139 |
| 138 bool is_accessed_from_inner_scope() const { | 140 bool is_accessed_from_inner_scope() const { |
| 139 return is_accessed_from_inner_scope_; | 141 return is_accessed_from_inner_scope_; |
| 140 } | 142 } |
| 141 void MarkAsAccessedFromInnerScope() { | 143 void MarkAsAccessedFromInnerScope() { |
| 142 is_accessed_from_inner_scope_ = true; | 144 is_accessed_from_inner_scope_ = true; |
| 143 } | 145 } |
| 144 bool is_used() { return is_used_; } | 146 bool is_used() { return is_used_; } |
| 145 void set_is_used(bool flag) { is_used_ = flag; } | 147 void set_is_used(bool flag) { is_used_ = flag; } |
| 146 | 148 |
| 147 bool IsVariable(Handle<String> n) const { | 149 bool IsVariable(Handle<String> n) const { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 205 |
| 204 // Usage info. | 206 // Usage info. |
| 205 bool is_accessed_from_inner_scope_; // set by variable resolver | 207 bool is_accessed_from_inner_scope_; // set by variable resolver |
| 206 bool is_used_; | 208 bool is_used_; |
| 207 }; | 209 }; |
| 208 | 210 |
| 209 | 211 |
| 210 } } // namespace v8::internal | 212 } } // namespace v8::internal |
| 211 | 213 |
| 212 #endif // V8_VARIABLES_H_ | 214 #endif // V8_VARIABLES_H_ |
| OLD | NEW |