| /arkcompiler/ets_frontend/ets2panda/compiler/core/ |
| D | pandagen.h | 38 class AstNode; variable 70 void StoreAccumulator(const ir::AstNode *node, VReg vreg); 71 void LoadAccumulator(const ir::AstNode *node, VReg reg); 73 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, VReg vd, VReg vs) override; 74 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, OutVReg vd, VReg vs) override; 75 void MoveVreg(const ir::AstNode *node, VReg vd, VReg vs); 77 void LoadAccumulatorDouble(const ir::AstNode *node, double num); 78 void LoadAccumulatorInt(const ir::AstNode *node, size_t num); 80 void LoadConst(const ir::AstNode *node, Constant id); 81 void StoreConst(const ir::AstNode *node, VReg reg, Constant id); [all …]
|
| D | ETSGen.h | 19 #include "ir/astNode.h" 46 [[nodiscard]] VReg StoreException(const ir::AstNode *node); 47 …void ApplyConversionAndStoreAccumulator(const ir::AstNode *node, VReg vreg, const checker::Type *t… 48 void StoreAccumulator(const ir::AstNode *node, VReg vreg); 49 void LoadAccumulator(const ir::AstNode *node, VReg vreg); 50 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, VReg vd, VReg vs) override; 51 [[nodiscard]] IRNode *AllocMov(const ir::AstNode *node, OutVReg vd, VReg vs) override; 52 void MoveVreg(const ir::AstNode *node, VReg vd, VReg vs); 57 void LoadDynamicModuleVariable(const ir::AstNode *node, varbinder::Variable const *var); 58 void LoadDynamicNamespaceVariable(const ir::AstNode *node, varbinder::Variable const *var); [all …]
|
| D | pandagen.cpp | 49 explicit EcmaDisabled(const ir::AstNode *node, [[maybe_unused]] Args &&...args) : IRNode(node) in EcmaDisabled() 331 void PandaGen::StoreAccumulator(const ir::AstNode *node, VReg vreg) in StoreAccumulator() 336 void PandaGen::LoadAccumulator(const ir::AstNode *node, VReg reg) in LoadAccumulator() 341 IRNode *PandaGen::AllocMov(const ir::AstNode *node, const VReg vd, const VReg vs) in AllocMov() 346 IRNode *PandaGen::AllocMov(const ir::AstNode *node, OutVReg vd, const VReg vs) in AllocMov() 352 void PandaGen::MoveVreg(const ir::AstNode *node, VReg vd, VReg vs) in MoveVreg() 357 void PandaGen::LoadAccumulatorDouble(const ir::AstNode *node, double num) in LoadAccumulatorDouble() 362 void PandaGen::LoadAccumulatorInt(const ir::AstNode *node, size_t num) in LoadAccumulatorInt() 367 void PandaGen::StoreConst(const ir::AstNode *node, VReg reg, Constant id) in StoreConst() 373 void PandaGen::LoadConst(const ir::AstNode *node, Constant id) in LoadConst() [all …]
|
| /arkcompiler/ets_frontend/es2panda/compiler/core/ |
| D | pandagen.h | 40 class AstNode; variable 130 const ir::AstNode *RootNode() const in RootNode() 264 void InitializeLexEnv(const ir::AstNode *node); 265 void CopyFunctionArguments(const ir::AstNode *node); 266 void GetFunctionObject(const ir::AstNode *node); 267 void GetNewTarget(const ir::AstNode *node); 268 void GetThis(const ir::AstNode *node); 269 void SetThis(const ir::AstNode *node); 271 … void StoreVar(const ir::AstNode *node, const binder::ScopeFindResult &result, bool isDeclaration); 273 void StLetOrClassToGlobalRecord(const ir::AstNode *node, const util::StringView &name); [all …]
|
| D | pandagen.cpp | 267 void PandaGen::InitializeLexEnv(const ir::AstNode *node) in InitializeLexEnv() 280 void PandaGen::CopyFunctionArguments(const ir::AstNode *node) in CopyFunctionArguments() 324 void PandaGen::GetFunctionObject(const ir::AstNode *node) in GetFunctionObject() 329 void PandaGen::GetNewTarget(const ir::AstNode *node) in GetNewTarget() 334 void PandaGen::GetThis(const ir::AstNode *node) in GetThis() 339 void PandaGen::SetThis(const ir::AstNode *node) in SetThis() 377 void PandaGen::StoreVar(const ir::AstNode *node, const binder::ScopeFindResult &result, bool isDecl… in StoreVar() 428 void PandaGen::StoreAccumulator(const ir::AstNode *node, VReg vreg) in StoreAccumulator() 433 void PandaGen::LoadAccFromArgs(const ir::AstNode *node) in LoadAccFromArgs() 448 void PandaGen::LoadObjProperty(const ir::AstNode *node, VReg obj, const Operand &prop) in LoadObjProperty() [all …]
|
| /arkcompiler/ets_frontend/ets2panda/ir/ |
| D | astNode.cpp | 16 #include "astNode.h" 22 AstNode::AstNode(AstNode const &other) in AstNode() function in ark::es2panda::ir::AstNode 34 [[nodiscard]] bool AstNode::IsExported() const noexcept in IsExported() 43 [[nodiscard]] bool AstNode::IsDefaultExported() const noexcept in IsDefaultExported() 52 [[nodiscard]] bool AstNode::IsExportedType() const noexcept in IsExportedType() 61 [[nodiscard]] bool AstNode::HasExportAlias() const noexcept in HasExportAlias() 70 bool AstNode::IsScopeBearer() const noexcept in IsScopeBearer() 75 varbinder::Scope *AstNode::Scope() const noexcept in Scope() 80 void AstNode::ClearScope() noexcept in ClearScope() 85 ir::ClassElement *AstNode::AsClassElement() in AsClassElement() [all …]
|
| D | astDump.h | 19 #include "ir/astNode.h" 33 explicit Nullish(const ir::AstNode *node) : node_(node) {} in Nullish() 35 const ir::AstNode *Node() const in Node() 41 const ir::AstNode *node_; 46 using Val = std::variant<const char *, const AstNode *, bool, std::vector<const AstNode *>>; 47 explicit Optional(const ir::AstNode *node) : value_(node) {} in Optional() 54 std::vector<const AstNode *> nodes; in Optional() 87 … bool, char16_t, lexer::Number, const ir::AstNode *, std::vector<const ir::AstNode *>, 97 …Property(const char *key, const ir::AstNode *node) : key_(key), value_(const_cast<ir::AstNode *>(n… in Property() 112 if (std::holds_alternative<const ir::AstNode *>(value) && in Property() [all …]
|
| D | typed.h | 19 #include "ir/astNode.h" 70 class TypedAstNode : public Typed<AstNode> { 79 explicit TypedAstNode(AstNodeType const type) : Typed<AstNode>(type) {} in TypedAstNode() 80 …explicit TypedAstNode(AstNodeType const type, ModifierFlags const flags) : Typed<AstNode>(type, fl… in TypedAstNode() 82 …TypedAstNode(TypedAstNode const &other) : Typed<AstNode>(static_cast<Typed<AstNode> const &>(other… in TypedAstNode() 85 class AnnotatedAstNode : public Annotated<AstNode> { 95 : Annotated<AstNode>(type, typeAnnotation) in AnnotatedAstNode() 98 explicit AnnotatedAstNode(AstNodeType const type) : Annotated<AstNode>(type) {} in AnnotatedAstNode() 99 …atedAstNode(AstNodeType const type, ModifierFlags const flags) : Annotated<AstNode>(type, flags) {} in AnnotatedAstNode() 101 …otatedAstNode(AnnotatedAstNode const &other) : Annotated<AstNode>(static_cast<Annotated<AstNode> c… in AnnotatedAstNode()
|
| D | statement.h | 19 #include "ir/astNode.h" 24 class Statement : public AstNode { 40 explicit Statement(AstNodeType type) : AstNode(type) {} in Statement() 41 explicit Statement(AstNodeType type, ModifierFlags flags) : AstNode(type, flags) {} in Statement() 42 Statement(Statement const &other) : AstNode(static_cast<AstNode const &>(other)) {} in Statement()
|
| /arkcompiler/ets_frontend/ets2panda/ast_verifier/ |
| D | helpers.h | 19 #include "ir/astNode.h" 24 bool IsImportLike(const ir::AstNode *ast); 25 bool IsExportLike(const ir::AstNode *ast); 26 bool IsBooleanType(const ir::AstNode *ast); 27 bool IsValidTypeForBinaryOp(const ir::AstNode *ast, bool isBitwise); 28 bool IsStringType(const ir::AstNode *ast); 29 bool IsVisibleInternalNode(const ir::AstNode *ast, const ir::AstNode *objTypeDeclNode); 30 const checker::Type *GetClassDefinitionType(const ir::AstNode *ast); 31 const checker::Type *GetTSInterfaceDeclarationType(const ir::AstNode *ast); 32 bool ValidateMethodAccessForClass(const ir::AstNode *ast, const ir::AstNode *ownerSignDeclNode, [all …]
|
| /arkcompiler/ets_frontend/ets2panda/checker/ets/ |
| D | assignAnalyzer.h | 25 class AstNode; variable 60 explicit AssignPendingExit(const ir::AstNode *node, Set &inits, Set &uninits) in AssignPendingExit() 86 using NodeIdMap = ArenaMap<const ir::AstNode *, NodeId>; 91 void Analyze(const ir::AstNode *node); 97 void AnalyzeNodes(const ir::AstNode *node); 98 void AnalyzeNode(const ir::AstNode *node); 99 bool AnalyzeStmtNode1(const ir::AstNode *node); 100 bool AnalyzeStmtNode2(const ir::AstNode *node); 101 bool AnalyzeExprNode1(const ir::AstNode *node); 102 bool AnalyzeExprNode2(const ir::AstNode *node); [all …]
|
| D | etsWarningAnalyzer.h | 24 …ETSWarningAnalyzer(const ir::AstNode *node, parser::Program *program, const ETSWarnings warning, b… in ETSWarningAnalyzer() 60 void CheckTypeOfBoxing(const ir::AstNode *node); 61 void CheckTypeOfUnboxing(const ir::AstNode *node); 64 std::string GetBoxingUnboxingType(const ir::AstNode *node); 65 void CheckTypeOfBoxingUnboxing(const ir::AstNode *node); 67 void ETSWarningSuggestFinal(const ir::AstNode *node); 68 void ETSWarningsProhibitTopLevelStatements(const ir::AstNode *node); 69 void ETSWarningBoostEqualityStatement(const ir::AstNode *node); 70 void ETSWarningRemoveAsync(const ir::AstNode *node); 71 void ETSWarningRemoveLambda(const ir::AstNode *node); [all …]
|
| D | baseAnalyzer.h | 23 class AstNode; variable 39 const ir::AstNode *node, JumpResolver jumpResolver = [] {}) 53 const ir::AstNode *Node() const in Node() 59 const ir::AstNode *node_; 83 LivenessStatus ResolveJump(const ir::AstNode *node, ir::AstNodeType jumpKind); 84 LivenessStatus ResolveContinues(const ir::AstNode *node); 85 LivenessStatus ResolveBreaks(const ir::AstNode *node); 86 const ir::AstNode *GetJumpTarget(const ir::AstNode *node) const;
|
| D | aliveAnalyzer.h | 25 class AstNode; variable 37 …AliveAnalyzer(const ir::AstNode *node, ETSChecker *checker) : BaseAnalyzer<PendingExit>(), checker… in AliveAnalyzer() 58 void AnalyzeNodes(const ir::AstNode *node); 59 void AnalyzeNode(const ir::AstNode *node); 60 void AnalyzeNodeHelper1(const ir::AstNode *node); 61 void AnalyzeNodeHelper2(const ir::AstNode *node); 62 void AnalyzeDef(const ir::AstNode *node); 63 void AnalyzeStat(const ir::AstNode *node);
|
| /arkcompiler/ets_frontend/arkguard/src/common/ |
| D | ApiExtractor.ts | 193 * @param astNode 195 const visitExport = function (astNode, isSystemApi: boolean): void { 202 if (isExportAssignment(astNode)) { 203 let nodeName = astNode.expression.getText(); 210 if (isExportDeclaration(astNode) && astNode.exportClause) { 216 if (isNamedExports(astNode.exportClause)) { 217 for (const element of astNode.exportClause.elements) { 228 if (isNamespaceExport(astNode.exportClause)) { 229 const exportElementName = astNode.exportClause.name.getText(); 242 let {hasExport, hasDeclare} = getKeyword(astNode.modifiers); [all …]
|
| /arkcompiler/ets_frontend/es2panda/compiler/function/ |
| D | functionBuilder.h | 55 virtual void DirectReturn(const ir::AstNode *node) const; 56 virtual void ImplicitReturn(const ir::AstNode *node) const; 57 virtual void ExplicitReturn(const ir::AstNode *node) const; 59 virtual void Await(const ir::AstNode *node); 60 virtual void YieldStar(const ir::AstNode *node); 62 virtual void Yield([[maybe_unused]] const ir::AstNode *node) in Yield() 75 …void SuspendResumeExecution(const ir::AstNode *node, VReg completionType, VReg completionValue) co… 76 …void AsyncYield(const ir::AstNode *node, VReg value, VReg completionType, VReg completionValue) co… 79 void HandleCompletion(const ir::AstNode *node, VReg completionType, VReg completionValue); 87 void resumeGenerator(const ir::AstNode *node, VReg completionType, VReg completionValue) const;
|
| /arkcompiler/ets_frontend/es2panda/ir/ |
| D | astDump.h | 19 #include <ir/astNode.h> 33 explicit Nullable(const ir::AstNode *node) : node_(node) {} in Nullable() 35 const ir::AstNode *Node() const in Node() 41 const ir::AstNode *node_; 46 using Val = std::variant<const char *, const ir::AstNode *, bool>; 47 explicit Optional(const ir::AstNode *node) : value_(node) {} in Optional() 74 … double, const ir::AstNode *, std::vector<const ir::AstNode *>, Constant, Nullable, Ignore>; 82 …Property(const char *key, const ir::AstNode *node) : key_(key), value_(const_cast<ir::AstNode *>(n… in Property() 97 … if (std::holds_alternative<const ir::AstNode *>(value) && std::get<const ir::AstNode *>(value)) { in Property() 98 value_ = std::get<const ir::AstNode *>(value); in Property() [all …]
|
| D | astNode.h | 39 class AstNode; variable 41 using NodeTraverser = std::function<void(AstNode *)>; 43 using UpdateNodes = std::variant<AstNode *, std::vector<AstNode *>>; 44 using NodeUpdater = std::function<UpdateNodes(AstNode *)>; 118 class AstNode { in AST_NODE_REINTERPRET_MAPPING() 120 explicit AstNode(AstNodeType type) : type_(type) {}; in AST_NODE_REINTERPRET_MAPPING() 121 virtual ~AstNode() = default; in AST_NODE_REINTERPRET_MAPPING() 122 NO_COPY_SEMANTIC(AstNode); in AST_NODE_REINTERPRET_MAPPING() 123 NO_MOVE_SEMANTIC(AstNode); in AST_NODE_REINTERPRET_MAPPING() 257 AstNode *Parent() in AST_NODE_REINTERPRET_MAPPING() [all …]
|
| /arkcompiler/ets_frontend/ets2panda/compiler/function/ |
| D | functionBuilder.h | 54 virtual void DirectReturn(const ir::AstNode *node) const; 55 virtual void ImplicitReturn(const ir::AstNode *node) const; 57 virtual void Await(const ir::AstNode *node); 58 virtual void YieldStar(const ir::AstNode *node); 60 virtual void Yield([[maybe_unused]] const ir::AstNode *node) in Yield() 73 …void SuspendResumeExecution(const ir::AstNode *node, VReg completionType, VReg completionValue) co… 74 void AsyncYield(const ir::AstNode *node, VReg completionType, VReg completionValue) const; 77 void HandleCompletion(const ir::AstNode *node, VReg completionType, VReg completionValue); 87 void ResumeGenerator(const ir::AstNode *node, VReg completionType, VReg completionValue) const;
|
| /arkcompiler/ets_frontend/ets2panda/compiler/lowering/ |
| D | util.h | 19 #include "ir/astNode.h" 25 varbinder::Scope *NearestScope(const ir::AstNode *ast); 26 checker::ETSObjectType const *ContainingClass(const ir::AstNode *ast); 29 void ClearTypesVariablesAndScopes(ir::AstNode *node) noexcept; 30 ArenaSet<varbinder::Variable *> FindCaptured(ArenaAllocator *allocator, ir::AstNode *scopeBearer) n… 33 void Recheck(varbinder::ETSBinder *varBinder, checker::ETSChecker *checker, ir::AstNode *node); 36 void CheckLoweredNode(varbinder::ETSBinder *varBinder, checker::ETSChecker *checker, ir::AstNode *n…
|
| /arkcompiler/ets_frontend/ets2panda/parser/ |
| D | TypedParser.h | 39 ArenaVector<ir::AstNode *> ParseTypeLiteralOrInterface(); 40 ArenaVector<ir::AstNode *> ParseTypeLiteralOrInterfaceBody(); 41 …void CheckObjectTypeForDuplicatedProperties(ir::Expression *key, ArenaVector<ir::AstNode *> &membe… 47 ir::AstNode *ParseTypeParameterInstantiationImpl(TypeAnnotationParsingOptions *options); 50 ir::AstNode *ParseTypeParameterDeclarationImpl(TypeAnnotationParsingOptions *options); 68 …ir::AstNode *ParseClassElement(const ArenaVector<ir::AstNode *> &properties, ir::ClassDefinitionMo… 71 …static bool CheckClassElementInterfaceBody(ir::AstNode *property, ArenaVector<ir::AstNode *> &prop… 72 bool CheckClassElement(ir::AstNode *property, ir::MethodDefinition *&ctor, 73 ArenaVector<ir::AstNode *> &properties) override; 108 virtual ir::AstNode *ParseTypeLiteralOrInterfaceMember() in ParseTypeLiteralOrInterfaceMember() [all …]
|
| D | ETSparser.h | 70 void ProcessFormattedArg(std::vector<ir::AstNode *> &nodes, T &&arg) in ProcessFormattedArg() 72 if constexpr (std::is_convertible_v<std::decay_t<T>, ir::AstNode *>) { in ProcessFormattedArg() 86 } else if constexpr (std::is_same_v<std::decay_t<T>, ArenaVector<ir::AstNode *>>) { in ProcessFormattedArg() 104 …ir::Expression *CreateFormattedExpression(std::string_view sourceCode, std::vector<ir::AstNode *> … 109 std::vector<ir::AstNode *> insertingNodes {}; in CreateFormattedExpression() 115 …ir::Statement *CreateFormattedStatement(std::string_view sourceCode, std::vector<ir::AstNode *> &i… 120 std::vector<ir::AstNode *> insertingNodes {}; in CreateFormattedStatement() 129 … std::vector<ir::AstNode *> &insertingNodes); 134 std::vector<ir::AstNode *> insertingNodes {}; in CreateFormattedStatements() 142 … std::vector<ir::AstNode *> &insertingNodes, [all …]
|
| /arkcompiler/ets_frontend/ets2panda/compiler/base/ |
| D | lreference.h | 23 class AstNode; variable 71 const ir::AstNode *Node() const in Node() 93 … std::tuple<CodeGen *, const ir::AstNode *, ReferenceKind, varbinder::ConstScopeFindResult, bool>; 94 static LReferenceBase CreateBase(CodeGen *cg, const ir::AstNode *node, bool isDeclaration); 96 …explicit LReference(const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFindResul… in LReference() 103 const ir::AstNode *node_; 111 …JSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFin… 120 static JSLReference Create(CodeGen *cg, const ir::AstNode *node, bool isDeclaration) in Create() 134 …ETSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFi… 143 …static ETSLReference Create(CodeGen *const cg, const ir::AstNode *const node, const bool isDeclara…
|
| /arkcompiler/ets_frontend/ets2panda/ir/statements/ |
| D | annotationUsage.h | 22 #include "ir/astNode.h" 33 explicit AnnotationUsage(Expression *expr, ArenaVector<AstNode *> &&properties) in AnnotationUsage() 43 [[nodiscard]] ArenaVector<AstNode *> &Properties() noexcept in Properties() 48 [[nodiscard]] const ArenaVector<AstNode *> &Properties() const noexcept in Properties() 53 [[nodiscard]] const ArenaVector<AstNode *> *PropertiesPtr() const in PropertiesPtr() 58 void AddProperty(AstNode *property) in AddProperty() 63 void SetProperties(ArenaVector<AstNode *> &&properties) in SetProperties() 68 [[nodiscard]] AnnotationUsage *Clone(ArenaAllocator *allocator, AstNode *parent) override; 108 ArenaVector<ir::AstNode *> properties_;
|
| /arkcompiler/ets_frontend/es2panda/parser/transformer/ |
| D | transformer.h | 23 #include "ir/astNode.h" 114 ir::AstNode *VisitTSNodes(ir::AstNode *parent); 115 ir::UpdateNodes VisitTSNode(ir::AstNode *childNode); 117 std::vector<ir::AstNode *> VisitExportNamedVariable(ir::Statement *decl); 118 ir::AstNode *VisitTsImportEqualsDeclaration(ir::TSImportEqualsDeclaration *node); 146 void FindSuperCall(const ir::AstNode *parent, bool *hasSuperCall); 147 void FindSuperCallInCtorChildNode(const ir::AstNode *childNode, bool *hasSuperCall); 151 ir::AstNode *node, 161 std::vector<ir::AstNode *> CreateClassDecorators(ir::ClassDeclaration *node, 162 … const std::vector<ir::AstNode *> &variableDeclarations); [all …]
|