• Home
  • Raw
  • Download

Lines Matching refs:scope

47 Variable* VariableMap::Declare(Zone* zone, Scope* scope,  in Declare()  argument
63 p->value = new (zone) Variable(scope, name, mode, kind, initialization_flag, in Declare()
153 Scope::Snapshot::Snapshot(Scope* scope) in Snapshot() argument
154 : outer_scope_(scope), in Snapshot()
155 top_inner_scope_(scope->inner_scope_), in Snapshot()
156 top_unresolved_(scope->unresolved_), in Snapshot()
157 top_local_(scope->GetClosureScope()->locals_.end()), in Snapshot()
158 top_decl_(scope->GetClosureScope()->decls_.end()) {} in Snapshot()
342 DeclarationScope* scope = GetClosureScope(); in HasSimpleParameters() local
343 return !scope->is_function_scope() || scope->has_simple_parameters(); in HasSimpleParameters()
470 const AstRawString* name, Scope* scope, in DeclareSloppyBlockFunction() argument
473 new (zone()) SloppyBlockFunctionMap::Delegate(scope, statement); in DeclareSloppyBlockFunction()
526 Scope* query_scope = delegate->scope()->outer_scope(); in HoistSloppyBlockFunctions()
566 delegate->scope()->NewUnresolved(factory, name), kNoSourcePosition); in HoistSloppyBlockFunctions()
589 DeclarationScope* scope = info->literal()->scope(); in Analyze() local
593 if (scope->outer_scope()) { in Analyze()
597 scope->ReplaceOuterScope(Scope::DeserializeScopeChain( in Analyze()
603 scope->SetScriptScopeInfo(outer_scope_info); in Analyze()
607 if (scope->is_eval_scope() && is_sloppy(scope->language_mode())) { in Analyze()
609 scope->HoistSloppyBlockFunctions(&factory); in Analyze()
617 DCHECK(scope->scope_type() == SCRIPT_SCOPE || in Analyze()
618 scope->outer_scope()->scope_type() == SCRIPT_SCOPE || in Analyze()
619 scope->outer_scope()->already_resolved_ || in Analyze()
620 (info->asm_function_scope() && scope->is_function_scope())); in Analyze()
623 scope->set_should_eager_compile(); in Analyze()
625 scope->AllocateVariables(info, mode); in Analyze()
638 scope->Print(); in Analyze()
640 scope->CheckScopePositions(); in Analyze()
641 scope->CheckZones(); in Analyze()
735 Scope* scope = this; in GetUnremovedScope() local
736 while (scope != nullptr && scope->HasBeenRemoved()) { in GetUnremovedScope()
737 scope = scope->outer_scope(); in GetUnremovedScope()
739 DCHECK_NOT_NULL(scope); in GetUnremovedScope()
740 return scope; in GetUnremovedScope()
757 Scope* scope = inner_scope_; in FinalizeBlockScope() local
758 scope->outer_scope_ = outer_scope(); in FinalizeBlockScope()
759 while (scope->sibling_ != nullptr) { in FinalizeBlockScope()
760 scope = scope->sibling_; in FinalizeBlockScope()
761 scope->outer_scope_ = outer_scope(); in FinalizeBlockScope()
763 scope->sibling_ = outer_scope()->inner_scope_; in FinalizeBlockScope()
853 DCHECK_EQ(local->scope(), local->scope()->GetClosureScope()); in Reparent()
854 DCHECK_NE(local->scope(), new_parent); in Reparent()
938 for (Scope* scope = this; in Lookup() local
939 scope != NULL; in Lookup()
940 scope = scope->outer_scope()) { in Lookup()
941 Variable* var = scope->LookupLocal(name); in Lookup()
1214 DeclarationScope* scope = GetClosureScope(); in NewTemporary() local
1216 Variable(scope, name, TEMPORARY, NORMAL_VARIABLE, kCreatedInitialized); in NewTemporary()
1217 scope->AddLocal(var); in NewTemporary()
1229 Scope* current = decl->scope(); in CheckConflictingVarDeclarations()
1322 int Scope::ContextChainLength(Scope* scope) const { in ContextChainLength()
1324 for (const Scope* s = this; s != scope; s = s->outer_scope_) { in ContextChainLength()
1346 for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) { in MaxNestedContextChainLength() local
1347 if (scope->is_function_scope()) continue; in MaxNestedContextChainLength()
1348 max_context_chain_length = std::max(scope->MaxNestedContextChainLength(), in MaxNestedContextChainLength()
1358 Scope* scope = this; in GetDeclarationScope() local
1359 while (!scope->is_declaration_scope()) { in GetDeclarationScope()
1360 scope = scope->outer_scope(); in GetDeclarationScope()
1362 return scope->AsDeclarationScope(); in GetDeclarationScope()
1366 const Scope* scope = this; in GetClosureScope() local
1367 while (!scope->is_declaration_scope() || scope->is_block_scope()) { in GetClosureScope()
1368 scope = scope->outer_scope(); in GetClosureScope()
1370 return scope->AsDeclarationScope(); in GetClosureScope()
1374 Scope* scope = this; in GetClosureScope() local
1375 while (!scope->is_declaration_scope() || scope->is_block_scope()) { in GetClosureScope()
1376 scope = scope->outer_scope(); in GetClosureScope()
1378 return scope->AsDeclarationScope(); in GetClosureScope()
1391 Scope* scope = this; in GetModuleScope() local
1392 DCHECK(!scope->is_script_scope()); in GetModuleScope()
1393 while (!scope->is_module_scope()) { in GetModuleScope()
1394 scope = scope->outer_scope(); in GetModuleScope()
1395 DCHECK_NOT_NULL(scope); in GetModuleScope()
1397 return scope->AsModuleScope(); in GetModuleScope()
1401 Scope* scope = this; in GetReceiverScope() local
1402 while (!scope->is_script_scope() && in GetReceiverScope()
1403 (!scope->is_function_scope() || in GetReceiverScope()
1404 scope->AsDeclarationScope()->is_arrow_scope())) { in GetReceiverScope()
1405 scope = scope->outer_scope(); in GetReceiverScope()
1407 return scope->AsDeclarationScope(); in GetReceiverScope()
1411 Scope* scope = outer_scope_; in GetOuterScopeWithContext() local
1412 while (scope && !scope->NeedsContext()) { in GetOuterScopeWithContext()
1413 scope = scope->outer_scope(); in GetOuterScopeWithContext()
1415 return scope; in GetOuterScopeWithContext()
1664 DeclarationScope* scope = AsDeclarationScope(); in Print() local
1665 if (scope->was_lazily_parsed()) Indent(n1, "// lazily parsed\n"); in Print()
1666 if (scope->ShouldEagerCompile()) Indent(n1, "// will be compiled\n"); in Print()
1706 for (Scope* scope = inner_scope_; scope != nullptr; in Print() local
1707 scope = scope->sibling_) { in Print()
1709 scope->Print(n1); in Print()
1722 for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) { in CheckScopePositions() local
1723 scope->CheckScopePositions(); in CheckScopePositions()
1729 for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) { in CheckZones() local
1730 if (scope->is_declaration_scope() && in CheckZones()
1731 scope->AsDeclarationScope()->was_lazily_parsed()) { in CheckZones()
1732 DCHECK_NULL(scope->zone()); in CheckZones()
1733 DCHECK_NULL(scope->inner_scope_); in CheckZones()
1736 CHECK_EQ(scope->zone(), zone()); in CheckZones()
1737 scope->CheckZones(); in CheckZones()
1848 bool AccessNeedsHoleCheck(Variable* var, VariableProxy* proxy, Scope* scope) { in AccessNeedsHoleCheck() argument
1855 return AccessNeedsHoleCheck(var->local_if_not_shadowed(), proxy, scope); in AccessNeedsHoleCheck()
1887 if (var->scope()->GetDeclarationScope() != scope->GetDeclarationScope()) { in AccessNeedsHoleCheck()
1892 DCHECK(IsDerivedConstructor(scope->GetDeclarationScope()->function_kind())); in AccessNeedsHoleCheck()
1901 return var->scope()->is_nonlinear() || in AccessNeedsHoleCheck()
1958 for (Scope* scope = inner_scope_; scope != nullptr; in ResolveVariablesRecursively() local
1959 scope = scope->sibling_) { in ResolveVariablesRecursively()
1960 scope->ResolveVariablesRecursively(info); in ResolveVariablesRecursively()
2009 for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) { in FetchFreeVariables() local
2010 stack = scope->FetchFreeVariables(max_outer_scope, info, stack); in FetchFreeVariables()
2105 DCHECK_EQ(this, var->scope()); in AllocateParameterLocals()
2134 DCHECK_EQ(receiver()->scope(), this); in AllocateReceiver()
2139 DCHECK(var->scope() == this); in AllocateNonParameterLocal()
2203 for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) { in AllocateVariablesRecursively() local
2204 scope->AllocateVariablesRecursively(); in AllocateVariablesRecursively()
2252 for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) { in AllocateScopeInfosRecursively() local
2253 if (!scope->is_function_scope() || in AllocateScopeInfosRecursively()
2254 scope->AsDeclarationScope()->ShouldEagerCompile()) { in AllocateScopeInfosRecursively()
2255 scope->AllocateScopeInfosRecursively(isolate, next_outer_scope); in AllocateScopeInfosRecursively()
2266 for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) { in AllocateDebuggerScopeInfos() local
2267 if (scope->is_function_scope()) continue; in AllocateDebuggerScopeInfos()
2268 scope->AllocateDebuggerScopeInfos(isolate, outer); in AllocateDebuggerScopeInfos()