OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // declared before, the previously declared variable is returned. | 153 // declared before, the previously declared variable is returned. |
154 Variable* DeclareLocal(Handle<String> name, | 154 Variable* DeclareLocal(Handle<String> name, |
155 VariableMode mode, | 155 VariableMode mode, |
156 InitializationFlag init_flag, | 156 InitializationFlag init_flag, |
157 Interface* interface = Interface::NewValue()); | 157 Interface* interface = Interface::NewValue()); |
158 | 158 |
159 // Declare an implicit global variable in this scope which must be a | 159 // Declare an implicit global variable in this scope which must be a |
160 // global scope. The variable was introduced (possibly from an inner | 160 // global scope. The variable was introduced (possibly from an inner |
161 // scope) by a reference to an unresolved variable with no intervening | 161 // scope) by a reference to an unresolved variable with no intervening |
162 // with statements or eval calls. | 162 // with statements or eval calls. |
163 Variable* DeclareGlobal(Handle<String> name); | 163 Variable* DeclareDynamicGlobal(Handle<String> name); |
164 | 164 |
165 // Create a new unresolved variable. | 165 // Create a new unresolved variable. |
166 template<class Visitor> | 166 template<class Visitor> |
167 VariableProxy* NewUnresolved(AstNodeFactory<Visitor>* factory, | 167 VariableProxy* NewUnresolved(AstNodeFactory<Visitor>* factory, |
168 Handle<String> name, | 168 Handle<String> name, |
169 Interface* interface = Interface::NewValue(), | 169 Interface* interface = Interface::NewValue(), |
170 int position = RelocInfo::kNoPosition) { | 170 int position = RelocInfo::kNoPosition) { |
171 // Note that we must not share the unresolved variables with | 171 // Note that we must not share the unresolved variables with |
172 // the same name because they may be removed selectively via | 172 // the same name because they may be removed selectively via |
173 // RemoveUnresolved(). | 173 // RemoveUnresolved(). |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 void SetDefaults(ScopeType type, | 616 void SetDefaults(ScopeType type, |
617 Scope* outer_scope, | 617 Scope* outer_scope, |
618 Handle<ScopeInfo> scope_info); | 618 Handle<ScopeInfo> scope_info); |
619 | 619 |
620 Zone* zone_; | 620 Zone* zone_; |
621 }; | 621 }; |
622 | 622 |
623 } } // namespace v8::internal | 623 } } // namespace v8::internal |
624 | 624 |
625 #endif // V8_SCOPES_H_ | 625 #endif // V8_SCOPES_H_ |
OLD | NEW |