Lines Matching refs:Scope
49 Variable* VariableMap::Declare(Zone* zone, Scope* scope,
98 // Implementation of Scope
100 Scope::Scope(Zone* zone)
105 Scope::Scope(Zone* zone, Scope* outer_scope, ScopeType scope_type)
116 Variable* Scope::DeclareHomeObjectVariable(AstValueFactory* ast_value_factory) {
128 Variable* Scope::DeclareStaticHomeObjectVariable(
145 : Scope(zone),
157 DeclarationScope::DeclarationScope(Zone* zone, Scope* outer_scope,
160 : Scope(zone, outer_scope, scope_type),
186 ClassScope::ClassScope(Zone* zone, Scope* outer_scope, bool is_anonymous)
187 : Scope(zone, outer_scope, CLASS_SCOPE),
197 : Scope(zone, CLASS_SCOPE, ast_value_factory, scope_info),
238 Scope::Scope(Zone* zone, ScopeType scope_type,
274 : Scope(zone, scope_type, ast_value_factory, scope_info),
289 Scope::Scope(Zone* zone, const AstRawString* catch_variable_name,
344 void Scope::SetDefaults() {
384 bool Scope::HasSimpleParameters() {
396 bool Scope::IsAsmModule() const {
400 bool Scope::ContainsAsmModule() const {
404 for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) {
417 Scope* Scope::DeserializeScopeChain(IsolateT* isolate, Zone* zone,
423 Scope* current_scope = nullptr;
424 Scope* innermost_scope = nullptr;
425 Scope* outer_scope = nullptr;
436 outer_scope = zone->New<Scope>(zone, WITH_SCOPE, ast_value_factory,
469 outer_scope = zone->New<Scope>(zone, BLOCK_SCOPE, ast_value_factory,
485 zone->New<Scope>(zone,
521 void Scope::SetScriptScopeInfo(IsolateT* isolate,
530 V8_EXPORT_PRIVATE) void Scope::SetScriptScopeInfo(Isolate* isolate,
534 V8_EXPORT_PRIVATE) void Scope::SetScriptScopeInfo(LocalIsolate* isolate,
539 Scope* Scope::DeserializeScopeChain(
544 Scope* Scope::DeserializeScopeChain(
550 bool Scope::IsReparsedMemberInitializerScope() const {
558 DeclarationScope* Scope::AsDeclarationScope() {
563 const DeclarationScope* Scope::AsDeclarationScope() const {
568 ModuleScope* Scope::AsModuleScope() {
573 const ModuleScope* Scope::AsModuleScope() const {
578 ClassScope* Scope::AsClassScope() {
583 const ClassScope* Scope::AsClassScope() const {
604 Scope* parameter_scope = HasSimpleParameters() ? this : outer_scope_;
609 Scope* outer_scope = decl_scope->outer_scope();
627 Scope* query_scope = sloppy_block_function->scope()->outer_scope();
800 Scope* cache) {
829 Scope* Scope::FinalizeBlockScope() {
848 Scope* scope = inner_scope_;
890 void Scope::Snapshot::Reparent(DeclarationScope* new_parent) {
896 Scope* inner_scope = new_parent->sibling_;
940 void Scope::ReplaceOuterScope(Scope* outer) {
949 Variable* Scope::LookupInScopeInfo(const AstRawString* name, Scope* cache) {
963 // The Scope is backed up by ScopeInfo. This means it cannot operate in a
1052 Variable* Scope::DeclareLocal(const AstRawString* name, VariableMode mode,
1085 Variable* Scope::DeclareVariable(
1171 Variable* Scope::DeclareVariableName(const AstRawString* name,
1207 Variable* Scope::DeclareCatchVariableName(const AstRawString* name) {
1219 void Scope::AddUnresolved(VariableProxy* proxy) {
1227 Scope* cache) {
1236 bool Scope::RemoveUnresolved(VariableProxy* var) {
1240 void Scope::DeleteUnresolved(VariableProxy* var) {
1245 Variable* Scope::NewTemporary(const AstRawString* name) {
1249 Variable* Scope::NewTemporary(const AstRawString* name,
1268 Scope* current = decl->AsVariableDeclaration()->AsNested()->scope();
1295 Scope* end = outer_scope()->GetNonEvalDeclarationScope()->outer_scope();
1299 Scope* current = outer_scope_;
1323 const AstRawString* Scope::FindVariableDeclaredIn(Scope* scope,
1373 bool Scope::HasThisReference() const {
1378 for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) {
1388 bool Scope::AllowsLazyParsingWithoutUnresolvedVariables(
1389 const Scope* outer) const {
1396 for (const Scope* s = this; s != outer; s = s->outer_scope_) {
1419 int Scope::ContextChainLength(Scope* scope) const {
1421 for (const Scope* s = this; s != scope; s = s->outer_scope_) {
1428 int Scope::ContextChainLengthUntilOutermostSloppyEval() const {
1432 for (const Scope* s = this; s != nullptr; s = s->outer_scope()) {
1444 DeclarationScope* Scope::GetDeclarationScope() {
1445 Scope* scope = this;
1452 DeclarationScope* Scope::GetNonEvalDeclarationScope() {
1453 Scope* scope = this;
1460 const DeclarationScope* Scope::GetClosureScope() const {
1461 const Scope* scope = this;
1468 DeclarationScope* Scope::GetClosureScope() {
1469 Scope* scope = this;
1476 bool Scope::NeedsScopeInfo() const {
1485 bool Scope::ShouldBanArguments() {
1489 DeclarationScope* Scope::GetReceiverScope() {
1490 Scope* scope = this;
1499 DeclarationScope* Scope::GetConstructorScope() {
1500 Scope* scope = this;
1511 Scope* Scope::GetHomeObjectScope() {
1512 Scope* scope = this;
1534 DeclarationScope* Scope::GetScriptScope() {
1535 Scope* scope = this;
1542 Scope* Scope::GetOuterScopeWithContext() {
1543 Scope* scope = outer_scope_;
1551 bool WasLazilyParsed(Scope* scope) {
1559 void Scope::ForEach(FunctionType callback) {
1560 Scope* scope = this;
1578 bool Scope::IsConstructorScope() const {
1583 bool Scope::IsOuterScopeOf(Scope* other) const {
1584 Scope* scope = other;
1592 void Scope::CollectNonLocals(DeclarationScope* max_outer_scope,
1594 this->ForEach([max_outer_scope, isolate, non_locals](Scope* scope) {
1604 Scope* lookup = WasLazilyParsed(scope) ? scope->outer_scope() : scope;
1628 void Scope::AnalyzePartially(DeclarationScope* max_outer_scope,
1633 maybe_in_arrowhead](Scope* scope) {
1666 Scope::CollectNonLocals(this, isolate, &non_locals);
1711 bool Scope::IsSkippableFunctionScope() {
1723 void Scope::SavePreparseData(Parser* parser) {
1724 this->ForEach([parser](Scope* scope) {
1746 // Try to resolve unresolved variables for this Scope and migrate those
1749 Scope::AnalyzePartially(this, ast_node_factory, &new_unresolved_list,
1899 void Scope::Print(int n) {
1933 // Scope info.
2018 for (Scope* scope = inner_scope_; scope != nullptr;
2028 void Scope::CheckScopePositions() {
2029 this->ForEach([](Scope* scope) {
2039 void Scope::CheckZones() {
2041 this->ForEach([](Scope* scope) {
2052 Variable* Scope::NonLocal(const AstRawString* name, VariableMode mode) {
2065 template <Scope::ScopeLookupMode mode>
2066 Variable* Scope::Lookup(VariableProxy* proxy, Scope* scope,
2067 Scope* outer_scope_end, Scope* cache_scope,
2174 template Variable* Scope::Lookup<Scope::kParsedScope>(
2175 VariableProxy* proxy, Scope* scope, Scope* outer_scope_end,
2176 Scope* cache_scope, bool force_context_allocation);
2177 template Variable* Scope::Lookup<Scope::kDeserializedScope>(
2178 VariableProxy* proxy, Scope* scope, Scope* outer_scope_end,
2179 Scope* cache_scope, bool force_context_allocation);
2181 Variable* Scope::LookupWith(VariableProxy* proxy, Scope* scope,
2182 Scope* outer_scope_end, Scope* cache_scope,
2207 Scope* target_scope;
2221 Variable* Scope::LookupSloppyEval(VariableProxy* proxy, Scope* scope,
2222 Scope* outer_scope_end, Scope* cache_scope,
2231 Scope* entry_cache = cache_scope == nullptr
2258 Scope* target = cache_scope == nullptr ? scope : cache_scope;
2267 Scope* target = cache_scope == nullptr ? scope : cache_scope;
2274 void Scope::ResolveVariable(VariableProxy* proxy) {
2288 void UpdateNeedsHoleCheck(Variable* var, VariableProxy* proxy, Scope* scope) {
2341 void Scope::ResolveTo(VariableProxy* proxy, Variable* var) {
2347 void Scope::ResolvePreparsedVariable(VariableProxy* proxy, Scope* scope,
2348 Scope* end) {
2363 bool Scope::ResolveVariablesRecursively(Scope* end) {
2382 for (Scope* scope = inner_scope_; scope != nullptr;
2390 bool Scope::MustAllocate(Variable* var) {
2406 bool Scope::MustAllocateInContext(Variable* var) {
2425 void Scope::AllocateStackSlot(Variable* var) {
2434 void Scope::AllocateHeapSlot(Variable* var) {
2497 void Scope::AllocateNonParameterLocal(Variable* var) {
2510 void Scope::AllocateNonParameterLocalsAndDeclaredGlobals() {
2571 void Scope::AllocateVariablesRecursively() {
2572 this->ForEach([](Scope* scope) -> Iteration {
2622 void Scope::AllocateScopeInfosRecursively(IsolateT* isolate,
2635 for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) {
2643 template EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) void Scope::
2646 template EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) void Scope::
2664 this->ForEach([](Scope* scope) {
2665 Scope* outer = scope->outer_scope();
2731 int Scope::ContextLocalCount() const {
2741 VariableProxy* Scope::NewHomeObjectVariableProxy(AstNodeFactory* factory,
2754 // on the Scope that needs the home object instead of the innermost scope.
3084 PrivateNameScopeIterator::PrivateNameScopeIterator(Scope* start)
3093 Scope* inner = current_scope_;
3094 Scope* scope = inner->outer_scope();