Home | History | Annotate | Download | only in src

Lines Matching refs:Scope

47   Variable* Declare(Scope* scope,
64 // The dynamic scope part holds hash maps for the variables that will
66 // are allocated on-demand from Scope::NonLocal to avoid wasting memory
95 class Scope: public ZoneObject {
100 Scope(Scope* outer_scope, ScopeType scope_type, Zone* zone);
102 // Compute top scope and allocate variables. For lazy compilation the top
103 // scope only contains the single lazily compiled function, so this
107 static Scope* DeserializeScopeChain(Context* context, Scope* global_scope,
110 // The scope name is only used for printing/debugging.
115 // Checks if the block scope is redundant, i.e. it does not contain any
116 // block scoped declarations. In that case it is removed from the scope
118 Scope* FinalizeBlockScope();
125 // Lookup a variable in this scope. Returns the variable or NULL if not found.
128 // This lookup corresponds to a lookup in the "intermediate" scope sitting
129 // between this scope and the outer scope. (ECMA-262, 3rd., requires that
130 // the name of named function literal is kept in an intermediate scope
131 // in between this scope and the next outer scope.)
135 // Lookup a variable in this scope or outer scopes.
140 // is in an intermediate scope between this function scope and the the
141 // outer scope. Only possible for function scopes; at most one variable.
147 // Declare a parameter in this scope. When there are duplicated
152 // Declare a local variable in this scope. If the variable has been
159 // Declare an implicit global variable in this scope which must be a
160 // global scope. The variable was introduced (possibly from an inner
161 // scope) by a reference to an unresolved variable with no intervening
189 // Creates a new internal variable in this scope. The name is only used
195 // Creates a new temporary variable in this scope. The name is only used
202 // this scope. The declarations are processed as part of entering
203 // the scope; see codegen.cc:ProcessDeclarations.
209 // Set an expression node that will be executed when the scope is
211 // scope - the first one - so if you try to set it multiple times
216 // scope doesn't have an illegal redeclaration node.
219 // Check if the scope has (at least) one illegal redeclaration.
222 // For harmony block scoping mode: Check if the scope has conflicting var
224 // scope over a let binding of the same name.
228 // Scope-specific info.
230 // Inform the scope that the corresponding code contains a with statement.
233 // Inform the scope that the corresponding code contains an eval call.
241 // Position in the source where this scope begins and ends.
243 // * For the scope of a with statement
247 // * For the scope of a block
251 // * For the scope of a function literal or decalaration
255 // * For the scope of a catch block
259 // * For the scope of a for-statement
272 // In some cases we want to force context allocation for a whole scope.
284 // Specific scope types.
315 // Is this scope inside a with statement.
317 // Does this scope contain a with statement.
323 // The type of this scope.
326 // The language mode of this scope.
354 // Inner scope list.
355 ZoneList<Scope*>* inner_scopes() { return &inner_scopes_; }
357 // The scope immediately surrounding this scope, or NULL.
358 Scope* outer_scope() const { return outer_scope_; }
366 // Collect stack and context allocated local variables in this scope. Note
385 // For module scopes, the host scope's internal variable binding this module.
388 // Make sure this scope and all outer scopes are eagerly compiled.
391 // Determine if we can use lazy compilation for this scope.
394 // Determine if we can use lazy compilation for this scope without a context.
397 // True if the outer context of this scope is always the native context.
400 // True if the outer context allows lazy compilation of this scope.
403 // The number of contexts between this and scope; zero if this == scope.
404 int ContextChainLength(Scope* scope);
406 scope.
407 Scope* GlobalScope();
409 // Find the first function, global, or eval scope. This is the scope
411 Scope* DeclarationScope();
415 // Get the chain of nested scopes within this scope for the source statement
416 // position. The scopes will be added to the list from the outermost scope to
417 // the innermost scope. Only nested block, catch or with scopes are tracked
425 // During formal parameter list parsing the scope only contains
447 // Scope tree.
448 Scope* outer_scope_; // the immediately enclosing outer scope, or NULL
449 ZoneList<Scope*> inner_scopes_; // the immediately enclosed inner scopes
451 // The scope type.
457 // The variables declared in this scope:
461 // an inner scope) with no intervening with statements or eval calls.
471 // Unresolved variables referred to from this scope.
487 // Scope-specific information computed during parsing.
489 // This scope is inside a 'with' of some outer scope.
491 // This scope contains a 'with' statement.
493 // This scope or a nested catch scope or with scope contain an 'eval' call. At
494 // the 'eval' call site this scope is the declaration scope.
496 // The language mode of this scope.
508 // True if it doesn't need scope resolution (e.g., if the scope was
509 // constructed based on a serialized scope info or a catch context).
522 // For module scopes, the host scope's internal variable binding this module.
525 // Serialized scope info support.
540 // the binding and no scope between the reference scope (inclusive) and
541 // binding scope (exclusive) makes a non-strict 'eval' call.
546 // the binding, but some scope between the reference scope (inclusive) and
547 // binding scope (exclusive) makes a non-strict 'eval' call, that might
555 // no scope between the reference scope (inclusive) and global scope
561 // statement, but some scope between the reference scope (inclusive) and
562 // global scope (exclusive) makes a non-strict 'eval' call, that might
580 // scope. If the code is executed because of a call to 'eval', the context
593 // Scope analysis.
609 void AllocateModulesRecursively(Scope* host_scope);
624 // Construct a scope based on the scope info.
625 Scope(Scope* inner_scope, ScopeType type, Handle<ScopeInfo> scope_info,
628 // Construct a catch scope with a binding for the name.
629 Scope(Scope* inner_scope, Handle<String> catch_variable_name, Zone* zone);
631 void AddInnerScope(Scope* inner_scope) {
639 Scope* outer_scope,