/arkcompiler/ets_frontend/ets2panda/compiler/lowering/scopesInit/ |
H A D | savedBindingsCtx.cpp | 29 for (const auto &[name, variable] : VarBinder()->GetScope()->OrderedBindings(Allocator())) { in BindImportDecl() 37 VarBinder()->GetScope()->AsModuleScope()->AddImportDecl(importDecl, std::move(declList)); in BindImportDecl() 52 if (VarBinder()->GetScope()->Bindings().size() == SavedBindings().size()) { in BindExportDecl() 63 for (const auto &[name, variable] : VarBinder()->GetScope()->Bindings()) { in BindExportDecl() 76 auto *moduleScope = VarBinder()->GetScope()->AsModuleScope(); in BindExportDecl()
|
H A D | scopesInitPhase.cpp | 34 if (auto *var = varBinder->GetScope()->FindLocal(name, varbinder::ResolveBindingOptions::BINDINGS); in AddOrGetDecl() 45 HandleBlockStmt(program->Ast(), GetScope()); in Perform() 53 auto const *const curScope = VarBinder()->GetScope(); in VisitScriptFunction() 69 HandleBlockStmt(blockStmt, GetScope()); in VisitBlockStatement() 100 return lexicalScope.GetScope(); in HandleFunctionSig() 113 auto *functionScope = functionCtx.GetScope(); in HandleFunction() 140 auto *classScope = classCtx.GetScope(); in VisitClassDefinition() 158 lexicalScope.GetScope()->BindDecls(declCtx.GetScope()); in VisitForUpdateStatement() 159 HandleFor(declCtx.GetScope(), lexicalScop in VisitForUpdateStatement() [all...] |
H A D | savedBindingsCtx.h | 26 : varbinder_(varbinder), savedBindings_(varbinder_->GetScope()->Bindings()) in SavedBindingsContext()
|
H A D | scopesInitPhase.h | 120 varbinder::Scope *GetScope() in GetScope() function in ark::es2panda::compiler::ScopesInitPhase 122 return VarBinder()->GetScope(); in GetScope()
|
/arkcompiler/ets_frontend/es2panda/parser/ |
H A D | commonjs.cpp | 77 auto *funcParamScope = funcParamContext.LexicalScope().GetScope(); in ParseCommonjs() 83 auto *functionScope = functionCtx.GetScope(); in ParseCommonjs() 114 auto *blockStmt = AllocNode<ir::BlockStatement>(Binder()->GetScope(), std::move(statements)); in ParseCommonjs() 115 Binder()->GetScope()->BindNode(blockStmt); in ParseCommonjs()
|
H A D | statementParser.cpp | 399 auto *moduleDecl = AllocNode<ir::TSModuleDeclaration>(localCtx.GetScope(), name, body, isDeclare, isGlobal); in ParseTsAmbientExternalModuleDeclaration() 401 localCtx.GetScope()->BindNode(moduleDecl); in ParseTsAmbientExternalModuleDeclaration() 414 auto *parentScope = Binder()->GetScope(); in ParseTsModuleOrNamespaceDelaration() 453 auto *moduleDecl = AllocNode<ir::TSModuleDeclaration>(localCtx.GetScope(), identNode, body, in ParseTsModuleOrNamespaceDelaration() 456 localCtx.GetScope()->BindNode(moduleDecl); in ParseTsModuleOrNamespaceDelaration() 516 auto *scope = Binder()->GetScope(); in ParseTsImportEqualsDeclaration() 654 auto *localBlockStmt = AllocNode<ir::BlockStatement>(localCtx.GetScope(), std::move(stmts)); in ParseFunctionStatement() 656 localCtx.GetScope()->BindNode(localBlockStmt); in ParseFunctionStatement() 790 const auto &bindings = Binder()->GetScope()->Bindings(); in ParseTsInterfaceDeclaration() 824 AllocNode<ir::TSInterfaceDeclaration>(localScope.GetScope(), i in ParseTsInterfaceDeclaration() [all...] |
H A D | parserImpl.cpp | 207 auto *blockStmt = AllocNode<ir::BlockStatement>(Binder()->GetScope(), std::move(statements)); in ParseProgram() 208 Binder()->GetScope()->BindNode(blockStmt); in ParseProgram() 1544 auto *funcParamScope = funcParamContext.LexicalScope().GetScope(); in ParseTsTypeLiteralOrInterfaceMember() 1935 auto *funcParamScope = funcParamContext.LexicalScope().GetScope(); in ParseTsFunctionType() 2666 auto *staticBlock = AllocNode<ir::ClassStaticBlock>(lexScope.GetScope(), blockStatement); in ParseStaticBlock() 2668 lexScope.GetScope()->BindNode(staticBlock); in ParseStaticBlock() 3021 auto *paramScope = Binder()->Allocator()->New<binder::FunctionParamScope>(Allocator(), Binder()->GetScope()); in CreateImplicitMethod() 3263 classCtx.GetScope(), identNode, typeParamDecl, superTypeParams, std::move(implements), ctor, staticInitializer, in ParseClassDefinition() 3271 classCtx.GetScope()->BindNode(classDefinition); in ParseClassDefinition() 3596 Binder()->GetScope() in ParseEnumMembers() [all...] |
/arkcompiler/ets_frontend/ets2panda/ast_verifier/ |
H A D | importExportAccessValid.cpp | 109 if (var->GetScope() != nullptr && var->GetScope()->Parent() != nullptr && in InvariantImportExportVariable() 110 var->GetScope()->Parent()->IsGlobalScope() && in InvariantImportExportVariable()
|
H A D | variableHasScope.cpp | 35 const auto scope = var->GetScope(); in operator ()() 85 const auto scope = var->GetScope(); in ScopeEncloseVariable()
|
H A D | checkScopeDeclaration.cpp | 36 auto const *const scope = var->GetScope(); in operator ()()
|
H A D | variableHasEnclosingScope.cpp | 33 const auto scope = var->GetScope(); in operator ()()
|
/arkcompiler/ets_frontend/ets2panda/ir/expressions/ |
H A D | arrowFunctionExpression.cpp | 148 return Function()->Scope()->IsSuperscopeOf(var->GetScope()) || in IsVarFromSubscope() 149 Function()->Scope()->ParamScope()->IsSuperscopeOf(var->GetScope()); in IsVarFromSubscope()
|
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ |
H A D | util.cpp | 98 auto *sc = var->GetScope(); 99 if (sc != nullptr && !sc->IsClassScope() && !sc->IsGlobalScope() && scopes.count(var->GetScope()) == 0) {
|
/arkcompiler/ets_frontend/ets2panda/varbinder/ |
H A D | ETSBinder.cpp | 72 ASSERT(GetScope() == TopScope()); in IdentifierAnalysis() 107 auto *iter = GetScope(); in LookupTypeReference() 208 auto res = GetScope()->Find(name, ResolveBindingOptions::ALL); in LookupIdentReference() 212 auto *outerFunction = GetScope()->EnclosingVariableScope()->Node(); in LookupIdentReference() 237 auto res = GetScope()->Find(decl->Id()->Name()); in InitializeInterfaceIdent() 429 ASSERT(GetScope()->Find(name, ResolveBindingOptions::DECLARATION).variable != nullptr); in AddDynamicSpecifiersToTopBindings() 430 auto specDecl = GetScope()->Find(name, ResolveBindingOptions::DECLARATION); in AddDynamicSpecifiersToTopBindings() 465 Scope *scope = var->GetScope(); in GetPackageName() 1121 auto *const var = scopeCtx.GetScope()->FindLocal(name, ResolveBindingOptions::ALL); in ImportGlobalProperties()
|
H A D | varbinder.h | 113 Scope *GetScope() const in GetScope() function in ark::es2panda::ark::es2panda::ark::es2panda::ark::es2panda::varbinder::VarBinder 288 T *GetScope() const in GetScope() function in ark::es2panda::ark::es2panda::ark::es2panda::ark::es2panda::varbinder::LexicalScope
|
H A D | variable.h | 101 [[nodiscard]] Scope *GetScope() const noexcept
|
/arkcompiler/ets_frontend/es2panda/ir/statements/ |
H A D | blockStatement.cpp | 67 scope_ != nullptr ? scope_ : binder->GetScope()); in UpdateSelf()
|
/arkcompiler/ets_frontend/ets2panda/evaluate/ |
H A D | varbinderScopes.h | 34 prevScope_(varBinder->GetScope()) in ProgramScope()
|
H A D | helpers.cpp | 282 binderScope_(varBinder->GetScope()), in SafeStateScope() 301 ASSERT(binderScope_ == varBinder_->GetScope()); in ~SafeStateScope()
|
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/ |
H A D | capturedVariables.cpp | 56 auto *scope = var->GetScope();
|
H A D | boxingForLocals.cpp | 66 auto *scope = var->GetScope(); in FindCaptured() 180 auto *scope = oldVar->GetScope(); in HandleVariableDeclarator() 282 auto *scope = newVar->GetScope(); in HandleAssignment()
|
H A D | enumLowering.cpp | 189 classDef->SetScope(classCtx.GetScope()); in CreateClass() 737 var->SetScope(elp->Varbinder()->GetScope()); 824 loopScope.GetScope()->BindDecls(loopDeclScope.GetScope()); 827 loopScope.GetScope()->BindNode(forLoop); 828 forLoop->SetScope(loopScope.GetScope()); 829 loopScope.GetScope()->DeclScope()->BindNode(forLoop);
|
/arkcompiler/ets_frontend/es2panda/binder/ |
H A D | binder.cpp | 666 loopCtx.GetScope()->InitVariable(); in BuildForUpdateLoop() 678 loopCtx.GetScope()->InitVariable(); in BuildForInOfLoop() 863 LexicalScope<Scope>::Enter(this, GetScope()); in ResolveReference() 884 loopScopeCtx.GetScope()->InitVariable(); in ResolveReference() 896 loopScopeCtx.GetScope()->InitVariable(); in ResolveReference() 1028 auto *scope = GetScope(); in AddDeclarationName()
|
H A D | binder.h | 86 Scope *GetScope() const in GetScope() function in panda::es2panda::panda::es2panda::binder::Binder 257 T *GetScope() const in GetScope() function in panda::es2panda::panda::es2panda::binder::LexicalScope
|
/arkcompiler/ets_frontend/ets2panda/checker/ets/ |
H A D | function.cpp | 1729 !var->HasFlag(varbinder::VariableFlags::LOCAL) || var->GetScope()->Node()->IsArrowFunctionExpression()) { in CheckCapturedVariables() 1882 var->SetScope(ctx.GetScope()); in CreateFuncDecl() 1971 var->SetScope(paramCtx.GetScope()); in CopyParams() 1979 return paramCtx.GetScope(); in CopyParams() 2028 auto *funcParamScope = varbinder::LexicalScope<varbinder::FunctionParamScope>(VarBinder()).GetScope(); in TransformTraillingLambda() 2032 auto *funcScope = funcCtx.GetScope(); in TransformTraillingLambda() 2039 if (var->GetScope() == trailingBlock->Scope()) { in TransformTraillingLambda() 2069 auto *funcScope = funcCtx.GetScope(); in ExtendArgumentsWithFakeLamda()
|