Home | History | Annotate | Download | only in src

Lines Matching refs:Scope

47   Variable* Declare(Scope* scope,
59 // The dynamic scope part holds hash maps for the variables that will
61 // are allocated on-demand from Scope::NonLocal to avoid wasting memory
85 class Scope: public ZoneObject {
90 Scope(Scope* outer_scope, ScopeType type);
92 // Compute top scope and allocate variables. For lazy compilation the top
93 // scope only contains the single lazily compiled function, so this
97 static Scope* DeserializeScopeChain(Context* context, Scope* global_scope);
99 // The scope name is only used for printing/debugging.
104 // Checks if the block scope is redundant, i.e. it does not contain any
105 // block scoped declarations. In that case it is removed from the scope
107 Scope* FinalizeBlockScope();
112 // Lookup a variable in this scope. Returns the variable or NULL if not found.
115 // This lookup corresponds to a lookup in the "intermediate" scope sitting
116 // between this scope and the outer scope. (ECMA-262, 3rd., requires that
117 // the name of named function literal is kept in an intermediate scope
118 // in between this scope and the next outer scope.)
122 // Lookup a variable in this scope or outer scopes.
127 // is in an intermediate scope between this function scope and the the
128 // outer scope. Only possible for function scopes; at most one variable.
140 // Declare a parameter in this scope. When there are duplicated
145 // Declare a local variable in this scope. If the variable has been
152 // Declare an implicit global variable in this scope which must be a
153 // global scope. The variable was introduced (possibly from an inner
154 // scope) by a reference to an unresolved variable with no intervening
182 // Creates a new temporary variable in this scope. The name is only used
189 // this scope. The declarations are processed as part of entering
190 // the scope; see codegen.cc:ProcessDeclarations.
196 // Set an expression node that will be executed when the scope is
198 // scope - the first one - so if you try to set it multiple times
203 // scope doesn't have an illegal redeclaration node.
206 // Check if the scope has (at least) one illegal redeclaration.
209 // For harmony block scoping mode: Check if the scope has conflicting var
211 // scope over a let binding of the same name.
214 // For harmony block scoping mode: Check if the scope has variable proxies
220 // Scope-specific info.
222 // Inform the scope that the corresponding code contains a with statement.
225 // Inform the scope that the corresponding code contains an eval call.
233 // Position in the source where this scope begins and ends.
235 // * For the scope of a with statement
239 // * For the scope of a block
243 // * For the scope of a function literal or decalaration
247 // * For the scope of a catch block
251 // * For the scope of a for-statement
267 // Specific scope types.
297 // Is this scope inside a with statement.
299 // Does this scope contain a with statement.
305 // The type of this scope.
308 // The language mode of this scope.
337 // Inner scope list.
338 ZoneList<Scope*>* inner_scopes() { return &inner_scopes_; }
340 // The scope immediately surrounding this scope, or NULL.
341 Scope* outer_scope() const { return outer_scope_; }
349 // Collect stack and context allocated local variables in this scope. Note
365 // Make sure this scope and all outer scopes are eagerly compiled.
368 // Determine if we can use lazy compilation for this scope.
371 // True if we can lazily recompile functions with this scope.
374 // True if the outer context of this scope is always the global context.
377 // True if this scope is inside a with scope and all declaration scopes
379 // invisible during scope info deserialization.
382 // The number of contexts between this and scope; zero if this == scope.
383 int ContextChainLength(Scope* scope);
385 // Find the first function, global, or eval scope. This is the scope
387 Scope* DeclarationScope();
391 // Get the chain of nested scopes within this scope for the source statement
392 // position. The scopes will be added to the list from the outermost scope to
393 // the innermost scope. Only nested block, catch or with scopes are tracked
401 // During formal parameter list parsing the scope only contains
423 // Scope tree.
424 Scope* outer_scope_; // the immediately enclosing outer scope, or NULL
425 ZoneList<Scope*> inner_scopes_; // the immediately enclosed inner scopes
427 // The scope type.
433 // The variables declared in this scope:
437 // an inner scope) with no intervening with statements or eval calls.
445 // Unresolved variables referred to from this scope.
461 // Scope-specific information computed during parsing.
463 // This scope is inside a 'with' of some outer scope.
465 // This scope contains a 'with' statement.
467 // This scope or a nested catch scope or with scope contain an 'eval' call. At
468 // the 'eval' call site this scope is the declaration scope.
470 // The language mode of this scope.
481 // True if it doesn't need scope resolution (e.g., if the scope was
482 // constructed based on a serialized scope info or a catch context).
492 // Serialized scope info support.
507 // the binding and no scope between the reference scope (inclusive) and
508 // binding scope (exclusive) makes a non-strict 'eval' call.
513 // the binding, but some scope between the reference scope (inclusive) and
514 // binding scope (exclusive) makes a non-strict 'eval' call, that might
522 // no scope between the reference scope (inclusive) and global scope
528 // statement, but some scope between the reference scope (inclusive) and
529 // global scope (exclusive) makes a non-strict 'eval' call, that might
547 // scope. If the code is executed because of a call to 'eval', the context
560 // Scope analysis.
590 // Construct a scope based on the scope info.
591 Scope(Scope* inner_scope, ScopeType type, Handle<ScopeInfo> scope_info);
593 // Construct a catch scope with a binding for the name.
594 Scope(Scope* inner_scope, Handle<String> catch_variable_name);
596 void AddInnerScope(Scope* inner_scope) {
604 Scope* outer_scope,