Lines Matching refs:Scope
31 Variable* VariableMap::Declare(Scope* scope, const AstRawString* name, in Declare()
93 Scope::Scope(Zone* zone, Scope* outer_scope, ScopeType scope_type, in Scope() function in v8::internal::Scope
116 Scope::Scope(Zone* zone, Scope* inner_scope, ScopeType scope_type, in Scope() function in v8::internal::Scope
141 Scope::Scope(Zone* zone, Scope* inner_scope, in Scope() function in v8::internal::Scope
169 void Scope::SetDefaults(ScopeType scope_type, Scope* outer_scope, in SetDefaults()
221 Scope* Scope::DeserializeScopeChain(Isolate* isolate, Zone* zone, in DeserializeScopeChain()
222 Context* context, Scope* script_scope) { in DeserializeScopeChain()
224 Scope* current_scope = NULL; in DeserializeScopeChain()
225 Scope* innermost_scope = NULL; in DeserializeScopeChain()
229 Scope* with_scope = new (zone) in DeserializeScopeChain()
230 Scope(zone, current_scope, WITH_SCOPE, Handle<ScopeInfo>::null(), in DeserializeScopeChain()
235 for (Scope* s = innermost_scope; s != NULL; s = s->outer_scope()) { in DeserializeScopeChain()
240 current_scope = new (zone) Scope(zone, current_scope, SCRIPT_SCOPE, in DeserializeScopeChain()
245 current_scope = new (zone) Scope(zone, current_scope, MODULE_SCOPE, in DeserializeScopeChain()
250 current_scope = new (zone) Scope(zone, current_scope, FUNCTION_SCOPE, in DeserializeScopeChain()
258 Scope(zone, current_scope, BLOCK_SCOPE, Handle<ScopeInfo>(scope_info), in DeserializeScopeChain()
263 current_scope = new (zone) Scope( in DeserializeScopeChain()
284 bool Scope::Analyze(ParseInfo* info) { in Analyze()
287 Scope* scope = info->literal()->scope(); in Analyze()
288 Scope* top = scope; in Analyze()
320 void Scope::Initialize() { in Initialize()
360 Scope* Scope::FinalizeBlockScope() { in FinalizeBlockScope()
389 void Scope::ReplaceOuterScope(Scope* outer) { in ReplaceOuterScope()
401 void Scope::PropagateUsageFlagsToScope(Scope* other) { in PropagateUsageFlagsToScope()
412 Variable* Scope::LookupLocal(const AstRawString* name) { in LookupLocal()
470 Variable* Scope::LookupFunctionVar(const AstRawString* name, in LookupFunctionVar()
493 Variable* Scope::Lookup(const AstRawString* name) { in Lookup()
494 for (Scope* scope = this; in Lookup()
504 Variable* Scope::DeclareParameter( in DeclareParameter()
532 Variable* Scope::DeclareLocal(const AstRawString* name, VariableMode mode, in DeclareLocal()
547 Variable* Scope::DeclareDynamicGlobal(const AstRawString* name) { in DeclareDynamicGlobal()
557 bool Scope::RemoveUnresolved(VariableProxy* var) { in RemoveUnresolved()
570 Variable* Scope::NewTemporary(const AstRawString* name) { in NewTemporary()
572 Scope* scope = this->ClosureScope(); in NewTemporary()
583 bool Scope::RemoveTemporary(Variable* var) { in RemoveTemporary()
596 void Scope::AddDeclaration(Declaration* declaration) { in AddDeclaration()
601 void Scope::SetIllegalRedeclaration(Expression* expression) { in SetIllegalRedeclaration()
610 Expression* Scope::GetIllegalRedeclaration() { in GetIllegalRedeclaration()
616 Declaration* Scope::CheckConflictingVarDeclarations() { in CheckConflictingVarDeclarations()
628 Scope* previous = NULL; in CheckConflictingVarDeclarations()
629 Scope* current = decl->scope(); in CheckConflictingVarDeclarations()
664 void Scope::CollectStackAndContextLocals( in CollectStackAndContextLocals()
718 bool Scope::AllocateVariables(ParseInfo* info, AstNodeFactory* factory) { in AllocateVariables()
738 bool Scope::HasTrivialContext() const { in HasTrivialContext()
743 for (const Scope* scope = this; scope != NULL; scope = scope->outer_scope_) { in HasTrivialContext()
753 bool Scope::HasTrivialOuterContext() const { in HasTrivialOuterContext()
754 Scope* outer = outer_scope_; in HasTrivialOuterContext()
763 bool Scope::AllowsLazyParsing() const { in AllowsLazyParsing()
767 for (const Scope* scope = this; scope != NULL; scope = scope->outer_scope_) { in AllowsLazyParsing()
774 bool Scope::AllowsLazyCompilation() const { return !force_eager_compilation_; } in AllowsLazyCompilation()
777 bool Scope::AllowsLazyCompilationWithoutContext() const { in AllowsLazyCompilationWithoutContext()
782 int Scope::ContextChainLength(Scope* scope) { in ContextChainLength()
784 for (Scope* s = this; s != scope; s = s->outer_scope_) { in ContextChainLength()
792 int Scope::MaxNestedContextChainLength() { in MaxNestedContextChainLength()
795 Scope* scope = inner_scopes_[i]; in MaxNestedContextChainLength()
806 Scope* Scope::DeclarationScope() { in DeclarationScope()
807 Scope* scope = this; in DeclarationScope()
815 Scope* Scope::ClosureScope() { in ClosureScope()
816 Scope* scope = this; in ClosureScope()
824 Scope* Scope::ReceiverScope() { in ReceiverScope()
825 Scope* scope = this; in ReceiverScope()
835 Handle<ScopeInfo> Scope::GetScopeInfo(Isolate* isolate) { in GetScopeInfo()
843 void Scope::GetNestedScopeChain(Isolate* isolate, in GetNestedScopeChain()
848 Scope* scope = inner_scopes_[i]; in GetNestedScopeChain()
860 void Scope::CollectNonLocals(HashMap* non_locals) { in CollectNonLocals()
878 void Scope::ReportMessage(int start_position, int end_position, in ReportMessage()
883 Scope* top = this; in ReportMessage()
982 void Scope::Print(int n) { in Print()
1083 Variable* Scope::NonLocal(const AstRawString* name, VariableMode mode) { in NonLocal()
1103 Variable* Scope::LookupRecursive(VariableProxy* proxy, in LookupRecursive()
1172 bool Scope::ResolveVariable(ParseInfo* info, VariableProxy* proxy, in ResolveVariable()
1260 bool Scope::CheckStrongModeDeclaration(VariableProxy* proxy, Variable* var) { in CheckStrongModeDeclaration()
1272 Scope* scope = this; in CheckStrongModeDeclaration()
1330 const Scope* eval_for_use = NearestOuterEvalScope(); in CheckStrongModeDeclaration()
1331 const Scope* eval_for_declaration = var->scope()->NearestOuterEvalScope(); in CheckStrongModeDeclaration()
1346 ClassVariable* Scope::ClassVariableForMethod() const { in ClassVariableForMethod()
1368 bool Scope::ResolveVariablesRecursively(ParseInfo* info, in ResolveVariablesRecursively()
1387 void Scope::PropagateScopeInfo(bool outer_scope_calls_sloppy_eval ) { in PropagateScopeInfo()
1395 Scope* inner = inner_scopes_[i]; in PropagateScopeInfo()
1410 bool Scope::MustAllocate(Variable* var) { in MustAllocate()
1426 bool Scope::MustAllocateInContext(Variable* var) { in MustAllocateInContext()
1447 bool Scope::HasArgumentsParameter(Isolate* isolate) { in HasArgumentsParameter()
1458 void Scope::AllocateStackSlot(Variable* var) { in AllocateStackSlot()
1467 void Scope::AllocateHeapSlot(Variable* var) { in AllocateHeapSlot()
1472 void Scope::AllocateParameterLocals(Isolate* isolate) { in AllocateParameterLocals()
1525 void Scope::AllocateParameter(Variable* var, int index) { in AllocateParameter()
1544 void Scope::AllocateReceiver() { in AllocateReceiver()
1556 void Scope::AllocateNonParameterLocal(Isolate* isolate, Variable* var) { in AllocateNonParameterLocal()
1570 void Scope::AllocateDeclaredGlobal(Isolate* isolate, Variable* var) { in AllocateDeclaredGlobal()
1588 void Scope::AllocateNonParameterLocalsAndDeclaredGlobals(Isolate* isolate) { in AllocateNonParameterLocalsAndDeclaredGlobals()
1639 void Scope::AllocateVariablesRecursively(Isolate* isolate) { in AllocateVariablesRecursively()
1680 int Scope::StackLocalCount() const { in StackLocalCount()
1686 int Scope::ContextLocalCount() const { in ContextLocalCount()
1695 int Scope::ContextGlobalCount() const { return num_global_slots(); } in ContextGlobalCount()