/arkcompiler/ets_frontend/ets2panda/compiler/core/ |
H A D | pandagen.h | 38 class AstNode; 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 *nod [all...] |
H A D | ETSGen.h | 46 [[nodiscard]] VReg StoreException(const ir::AstNode *node); 47 void ApplyConversionAndStoreAccumulator(const ir::AstNode *node, VReg vreg, const checker::Type *targetType); 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); 61 void LoadStaticProperty(const ir::AstNode *nod [all...] |
H A 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 *nod [all...] |
/arkcompiler/ets_frontend/es2panda/compiler/core/ |
H A D | pandagen.h | 40 class AstNode; 130 const ir::AstNode *RootNode() const in RootNode() 262 void InitializeLexEnv(const ir::AstNode *node); 263 void CopyFunctionArguments(const ir::AstNode *node); 264 void GetFunctionObject(const ir::AstNode *node); 265 void GetNewTarget(const ir::AstNode *node); 266 void GetThis(const ir::AstNode *node); 267 void SetThis(const ir::AstNode *node); 269 void StoreVar(const ir::AstNode *node, const binder::ScopeFindResult &result, bool isDeclaration); 271 void StLetOrClassToGlobalRecord(const ir::AstNode *nod [all...] |
H A D | pandagen.cpp | 253 void PandaGen::InitializeLexEnv(const ir::AstNode *node) in InitializeLexEnv() 266 void PandaGen::CopyFunctionArguments(const ir::AstNode *node) in CopyFunctionArguments() 310 void PandaGen::GetFunctionObject(const ir::AstNode *node) in GetFunctionObject() 315 void PandaGen::GetNewTarget(const ir::AstNode *node) in GetNewTarget() 320 void PandaGen::GetThis(const ir::AstNode *node) in GetThis() 325 void PandaGen::SetThis(const ir::AstNode *node) in SetThis() 363 void PandaGen::StoreVar(const ir::AstNode *node, const binder::ScopeFindResult &result, bool isDeclaration) in StoreVar() 414 void PandaGen::StoreAccumulator(const ir::AstNode *node, VReg vreg) in StoreAccumulator() 419 void PandaGen::LoadAccFromArgs(const ir::AstNode *node) in LoadAccFromArgs() 434 void PandaGen::LoadObjProperty(const ir::AstNode *nod [all...] |
/arkcompiler/ets_frontend/ets2panda/ir/ |
H A D | astNode.cpp | 22 AstNode::AstNode(AstNode const &other) in AstNode() function in ark::es2panda::ir::AstNode 34 [[nodiscard]] bool AstNode::IsExported() const noexcept 43 [[nodiscard]] bool AstNode::IsDefaultExported() const noexcept 52 [[nodiscard]] bool AstNode::IsExportedType() const noexcept 61 [[nodiscard]] bool AstNode::HasExportAlias() const noexcept 70 bool AstNode::IsScopeBearer() const noexcept 75 varbinder::Scope *AstNode::Scope() const noexcept 80 void AstNode [all...] |
H A D | astDump.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 *nod in Property() [all...] |
H A D | astNode.h | 46 class AstNode; 49 using NodeTransformer = std::function<AstNode *(AstNode *)>; 50 using NodeTraverser = std::function<void(AstNode *)>; 51 using NodePredicate = std::function<bool(AstNode *)>; 83 class AstNode { class 85 explicit AstNode(AstNodeType type) : type_(type) {}; in AstNode() function in ark::es2panda::ark::es2panda::ark::es2panda::ark::es2panda::ir::AstNode 86 explicit AstNode(AstNodeType type, ModifierFlags flags) : type_(type), flags_(flags) {}; in AstNode() function in ark::es2panda::ark::es2panda::ark::es2panda::ark::es2panda::ir::AstNode 87 virtual ~AstNode() = default; 89 AstNode() [all...] |
H A D | statement.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()
|
H A D | typed.h | 87 class TypedAstNode : public Typed<AstNode> { 96 explicit TypedAstNode(AstNodeType const type) : Typed<AstNode>(type) {} in TypedAstNode() 97 explicit TypedAstNode(AstNodeType const type, ModifierFlags const flags) : Typed<AstNode>(type, flags) {} in TypedAstNode() 99 TypedAstNode(TypedAstNode const &other) : Typed<AstNode>(static_cast<Typed<AstNode> const &>(other)) {} in TypedAstNode() 102 class AnnotatedAstNode : public Annotated<AstNode> { 112 : Annotated<AstNode>(type, typeAnnotation) in AnnotatedAstNode() 115 explicit AnnotatedAstNode(AstNodeType const type) : Annotated<AstNode>(type) {} in AnnotatedAstNode() 116 explicit AnnotatedAstNode(AstNodeType const type, ModifierFlags const flags) : Annotated<AstNode>(type, flags) {} in AnnotatedAstNode() 118 AnnotatedAstNode(AnnotatedAstNode const &other) : Annotated<AstNode>(static_cas [all...] |
/arkcompiler/ets_frontend/ets2panda/ast_verifier/ |
H A D | helpers.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 *as [all...] |
H A D | helpers.cpp | 29 bool IsImportLike(const ir::AstNode *ast) in IsImportLike() 35 bool IsExportLike(const ir::AstNode *ast) in IsExportLike() 41 bool IsBooleanType(const ir::AstNode *ast) in IsBooleanType() 66 bool IsValidTypeForBinaryOp(const ir::AstNode *ast, bool isBitwise) in IsValidTypeForBinaryOp() 107 bool IsStringType(const ir::AstNode *ast) in IsStringType() 131 bool IsVisibleInternalNode(const ir::AstNode *ast, const ir::AstNode *objTypeDeclNode) in IsVisibleInternalNode() 156 const checker::Type *GetClassDefinitionType(const ir::AstNode *ast) in GetClassDefinitionType() 158 const ir::AstNode *tmpNode = ast; in GetClassDefinitionType() 169 const checker::Type *GetTSInterfaceDeclarationType(const ir::AstNode *as [all...] |
H A D | variableHasEnclosingScope.h | 26 [[nodiscard]] CheckResult operator()(CheckContext &ctx, const ir::AstNode *ast); 29 bool CheckCatchClause(const ir::AstNode *ast, const ir::AstNode *node) const; 30 bool CheckScopeNodeExceptions(const ir::AstNode *node) const; 31 bool CheckAstExceptions(const ir::AstNode *ast) const;
|
/arkcompiler/ets_frontend/ets2panda/checker/ets/ |
H A D | assignAnalyzer.h | 25 class AstNode; 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 *nod [all...] |
H A D | etsWarningAnalyzer.h | 24 ETSWarningAnalyzer(const ir::AstNode *node, parser::Program *program, const ETSWarnings warning, bool etsWerror) 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 *nod [all...] |
H A D | baseAnalyzer.h | 23 class AstNode; 39 const ir::AstNode *node, JumpResolver jumpResolver = [] {}) in PendingExit() 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;
|
/arkcompiler/ets_frontend/es2panda/compiler/function/ |
H A 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) const; 76 void AsyncYield(const ir::AstNode *node, VReg value, VReg completionType, VReg completionValue) const; 79 void HandleCompletion(const ir::AstNode *node, VReg completionType, VReg completionValue); 87 void resumeGenerator(const ir::AstNode *nod [all...] |
/arkcompiler/ets_frontend/es2panda/ir/ |
H A D | astNode.h | 39 class AstNode; 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 { class 120 explicit AstNode(AstNodeType type) : type_(type) {}; in AstNode() function in panda::es2panda::panda::es2panda::panda::es2panda::ir::AstNode 121 virtual ~AstNode() = default; 122 NO_COPY_SEMANTIC(AstNode); 123 NO_MOVE_SEMANTIC(AstNode); [all...] |
H A D | astDump.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 *>(node)) {} in Property() 97 if (std::holds_alternative<const ir::AstNode *>(valu in Property() [all...] |
/arkcompiler/ets_frontend/ets2panda/compiler/function/ |
H A 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) const; 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/evaluate/ |
H A D | irCheckHelper.h | 27 class AstNode; 49 ScopedAstNode(parser::Program *p, varbinder::Scope *s, ir::AstNode *parent, ir::AstNode *n) in ScopedAstNode() 57 ir::AstNode *parentClass {nullptr}; 58 ir::AstNode *node {nullptr}; 77 bool CheckNewNode(ir::AstNode *node, varbinder::Scope *scope, ir::AstNode *parentClass, parser::Program *program); 81 void CheckGlobalEntity(parser::Program *program, ir::AstNode *node, bool mustCheck = true); 82 void CheckLocalEntity(ir::AstNode *node);
|
/arkcompiler/ets_frontend/ets2panda/parser/ |
H A D | TypedParser.h | 39 ArenaVector<ir::AstNode *> ParseTypeLiteralOrInterface(); 40 ArenaVector<ir::AstNode *> ParseTypeLiteralOrInterfaceBody(); 41 void CheckObjectTypeForDuplicatedProperties(ir::Expression *key, ArenaVector<ir::AstNode *> &members); 47 ir::AstNode *ParseTypeParameterInstantiationImpl(TypeAnnotationParsingOptions *options); 50 ir::AstNode *ParseTypeParameterDeclarationImpl(TypeAnnotationParsingOptions *options); 68 ir::AstNode *ParseClassElement(const ArenaVector<ir::AstNode *> &properties, ir::ClassDefinitionModifiers modifiers, 71 static bool CheckClassElementInterfaceBody(ir::AstNode *property, ArenaVector<ir::AstNode *> &properties); 72 bool CheckClassElement(ir::AstNode *propert [all...] |
/arkcompiler/ets_frontend/ets2panda/ir/visitor/ |
H A D | IterateAstVisitor.h | 48 virtual void HandleNode(ir::AstNode *node) = 0; 54 HandleNode(static_cast<ir::AstNode *>(node)); \ 80 void Iterate(ir::AstNode *node) in Iterate() 83 node->Iterate([this](ir::AstNode *child) { child->Accept(this); }); in Iterate() 87 void HandleNode(ir::AstNode *node) final 97 void HandleNode(ir::AstNode * /*node*/) final {} 104 void HandleNode(ir::AstNode * /*node*/) final
|
/arkcompiler/ets_frontend/ets2panda/compiler/base/ |
H A D | lreference.h | 23 class AstNode; 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::ConstScopeFindResult res, in LReference() 103 const ir::AstNode *node_; 111 JSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFindResult res, 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::ConstScopeFindResult res, 143 static ETSLReference Create(CodeGen *const cg, const ir::AstNode *cons [all...] |
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ |
H A D | util.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) noexcept; 33 void Recheck(varbinder::ETSBinder *varBinder, checker::ETSChecker *checker, ir::AstNode *node);
|