/arkcompiler/ets_frontend/ets2panda/compiler/core/ |
H A D | moduleContext.cpp | 53 for (const auto &[exportDecl, decls] : scope->Exports()) { in CompileExports() 54 if (exportDecl->IsExportAllDeclaration()) { in CompileExports() 55 pg->ImportModule(exportDecl, exportDecl->AsExportAllDeclaration()->Source()->Str()); in CompileExports() 56 } else if (exportDecl->IsExportNamedDeclaration() && in CompileExports() 57 (exportDecl->AsExportNamedDeclaration()->Source() != nullptr)) { in CompileExports() 58 pg->ImportModule(exportDecl, exportDecl->AsExportNamedDeclaration()->Source()->Str()); in CompileExports() 64 pg->StoreAccumulator(exportDecl, moduleReg); in CompileExports() 66 if (exportDecl in CompileExports() [all...] |
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/scopesInit/ |
H A D | savedBindingsCtx.cpp | 40 void ExportDeclarationContext::BindExportDecl(ir::AstNode *exportDecl) in BindExportDecl() argument 48 if (exportDecl->IsExportDefaultDeclaration()) { in BindExportDecl() 49 auto *decl = exportDecl->AsExportDefaultDeclaration(); in BindExportDecl() 68 util::StringView exportName(exportDecl->IsExportDefaultDeclaration() ? "default" : name); in BindExportDecl() 77 moduleScope->AddExportDecl(exportDecl, std::move(declList)); in BindExportDecl()
|
H A D | scopesInitPhase.h | 113 void VisitExportDefaultDeclaration(ir::ExportDefaultDeclaration *exportDecl) override; 114 void VisitExportNamedDeclaration(ir::ExportNamedDeclaration *exportDecl) override; 250 void VisitExportDefaultDeclaration(ir::ExportDefaultDeclaration *exportDecl) override; 251 void VisitExportNamedDeclaration(ir::ExportNamedDeclaration *exportDecl) override; 389 void VisitExportNamedDeclaration(ir::ExportNamedDeclaration *exportDecl) override;
|
H A D | scopesInitPhase.cpp | 313 void ScopesInitPhase::VisitExportDefaultDeclaration(ir::ExportDefaultDeclaration *exportDecl) in VisitExportDefaultDeclaration() argument 316 Iterate(exportDecl); in VisitExportDefaultDeclaration() 317 exportDeclCtx.BindExportDecl(exportDecl); in VisitExportDefaultDeclaration() 331 void ScopesInitPhase::VisitExportNamedDeclaration(ir::ExportNamedDeclaration *exportDecl) in VisitExportNamedDeclaration() argument 333 if (exportDecl->Decl() != nullptr) { in VisitExportNamedDeclaration() 335 Iterate(exportDecl); in VisitExportNamedDeclaration() 336 exportDeclCtx.BindExportDecl(exportDecl); in VisitExportNamedDeclaration() 340 for (auto *spec : exportDecl->Specifiers()) { in VisitExportNamedDeclaration() 342 AddOrGetDecl<varbinder::ExportDecl>(VarBinder(), spec->Local()->Name(), spec, exportDecl->Start(), in VisitExportNamedDeclaration() 346 VarBinder()->GetScope()->AsModuleScope()->AddExportDecl(exportDecl, st in VisitExportNamedDeclaration() 635 VisitExportDefaultDeclaration(ir::ExportDefaultDeclaration *exportDecl) VisitExportDefaultDeclaration() argument 641 VisitExportNamedDeclaration(ir::ExportNamedDeclaration *exportDecl) VisitExportNamedDeclaration() argument 1294 VisitExportNamedDeclaration(ir::ExportNamedDeclaration *exportDecl) VisitExportNamedDeclaration() argument [all...] |
H A D | savedBindingsCtx.h | 61 void BindExportDecl(ir::AstNode *exportDecl);
|
/arkcompiler/ets_frontend/ets2panda/parser/ |
H A D | statementTSParser.cpp | 295 ir::ExportNamedDeclaration *exportDecl = ParseNamedExportDeclaration(startLoc); in ParseExportDeclaration() local 297 if (exportDecl->Decl()->IsVariableDeclaration() && ((flags & StatementParsingFlags::GLOBAL) == 0) && in ParseExportDeclaration() 298 exportDecl->Parent() != nullptr && !exportDecl->Parent()->IsTSModuleBlock() && in ParseExportDeclaration() 303 return exportDecl; in ParseExportDeclaration()
|
/arkcompiler/ets_frontend/ets2panda/varbinder/ |
H A D | scope.cpp | 635 void ModuleScope::AddExportDecl(ir::AstNode *exportDecl, ExportDecl *decl) in AddExportDecl() argument 637 decl->BindNode(exportDecl); in AddExportDecl() 642 AddExportDecl(exportDecl, std::move(decls)); in AddExportDecl() 645 void ModuleScope::AddExportDecl(ir::AstNode *exportDecl, ExportDeclList &&decls) in AddExportDecl() argument 647 auto res = exports_.emplace_back(exportDecl, decls); in AddExportDecl() 650 decl->BindNode(exportDecl); in AddExportDecl() 675 for (const auto &[exportDecl, decls] : exports_) { in ExportAnalysis() 676 if (exportDecl->IsExportAllDeclaration()) { in ExportAnalysis() 677 const auto *exportAllDecl = exportDecl->AsExportAllDeclaration(); in ExportAnalysis() 691 if (exportDecl in ExportAnalysis() [all...] |
H A D | scope.h | 931 void AddExportDecl(ir::AstNode *exportDecl, ExportDecl *decl); 933 void AddExportDecl(ir::AstNode *exportDecl, ExportDeclList &&decls);
|
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/topLevelStmts/ |
H A D | importExportDecls.cpp | 192 void ImportExportDecls::VisitExportNamedDeclaration(ir::ExportNamedDeclaration *exportDecl) in VisitExportNamedDeclaration() argument 194 for (auto spec : exportDecl->Specifiers()) { in VisitExportNamedDeclaration() 196 if (exportDecl->IsExportedType()) { in VisitExportNamedDeclaration()
|
H A D | importExportDecls.h | 78 void VisitExportNamedDeclaration(ir::ExportNamedDeclaration *exportDecl) override;
|
/arkcompiler/ets_frontend/es2panda/binder/ |
H A D | binder.cpp | 218 void Binder::ValidateExportDecl(const ir::ExportNamedDeclaration *exportDecl) in ValidateExportDecl() argument 220 if (exportDecl->Source() != nullptr || exportDecl->Decl() != nullptr || exportDecl->IsType()) { in ValidateExportDecl() 225 for (auto *it : exportDecl->Specifiers()) { in ValidateExportDecl()
|
H A D | binder.h | 221 void ValidateExportDecl(const ir::ExportNamedDeclaration *exportDecl);
|
/arkcompiler/ets_frontend/es2panda/parser/ |
H A D | statementParser.cpp | 2898 ir::ExportNamedDeclaration *exportDecl = ParseNamedExportDeclaration(startLoc, std::move(decorators), in ParseExportDeclaration() local 2901 if (Extension() == ScriptExtension::TS && exportDecl->Decl()->IsVariableDeclaration() && in ParseExportDeclaration() 2902 !(flags & StatementParsingFlags::GLOBAL) && exportDecl->Parent() && in ParseExportDeclaration() 2903 !exportDecl->Parent()->IsTSModuleBlock() && !context_.IsModule()) { in ParseExportDeclaration() 2907 return exportDecl; in ParseExportDeclaration()
|