Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/scopes.h

Issue 10876067: Introduce global contexts to represent lexical global scope(s). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Sven's comments. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | src/scopes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698