Home
last modified time | relevance | path

Searched refs:varbinder (Results 1 - 25 of 230) sorted by relevance

12345678910

/arkcompiler/ets_frontend/ets2panda/compiler/lowering/scopesInit/
H A DsavedBindingsCtx.h19 #include "varbinder/varbinder.h"
25 explicit SavedBindingsContext(varbinder::VarBinder *varbinder) in SavedBindingsContext() argument
26 : varbinder_(varbinder), savedBindings_(varbinder_->GetScope()->Bindings()) in SavedBindingsContext()
39 varbinder::VarBinder *VarBinder() const in VarBinder()
44 const varbinder::Scope::VariableMap &SavedBindings() const in SavedBindings()
50 varbinder::VarBinder *varbinder_;
51 varbinder::Scope::VariableMap savedBindings_;
56 explicit ExportDeclarationContext(varbinder argument
69 ImportDeclarationContext(varbinder::VarBinder *varbinder) ImportDeclarationContext() argument
[all...]
H A DscopesInitPhase.cpp22 varbinder::LexicalScope<T> LexicalScopeCreateOrEnter(varbinder::VarBinder *varBinder, ir::AstNode *ast) in LexicalScopeCreateOrEnter()
25 return varbinder::LexicalScope<T>::Enter(varBinder, reinterpret_cast<T *>(ast->Scope())); in LexicalScopeCreateOrEnter()
27 return varbinder::LexicalScope<T>(varBinder); in LexicalScopeCreateOrEnter()
31 T *AddOrGetDecl(varbinder::VarBinder *varBinder, util::StringView name, ir::AstNode *ast, in AddOrGetDecl()
34 if (auto *var = varBinder->GetScope()->FindLocal(name, varbinder::ResolveBindingOptions::BINDINGS); in AddOrGetDecl()
56 curScope->Find(functionName, scriptFunction->IsStatic() ? varbinder::ResolveBindingOptions::ALL_STATIC in VisitScriptFunction()
57 : varbinder::ResolveBindingOptions::ALL_NON_STATIC); in VisitScriptFunction()
68 auto localCtx = LexicalScopeCreateOrEnter<varbinder::LocalScopeWithTypeAlias>(VarBinder(), blockStmt); in VisitBlockStatement()
89 varbinder
722 RunExternalNode(ir::AstNode *node, varbinder::VarBinder *varbinder) RunExternalNode() argument
[all...]
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/
H A DlocalClassLowering.h30 ArenaSet<varbinder::Variable *> const &capturedVars,
31 ArenaMap<varbinder::Variable *, varbinder::Variable *> &variableMap,
32 ArenaMap<varbinder::Variable *, ir::ClassProperty *> &propertyMap);
35 ArenaSet<varbinder::Variable *> const &capturedVars,
36 ArenaMap<varbinder::Variable *, varbinder::Variable *> &variableMap,
37 ArenaMap<varbinder::Variable *, varbinder::Variable *> &parameterMap);
40 ir::ClassDefinition *classDef, ArenaMap<varbinder
[all...]
H A DunionLowering.cpp17 #include "varbinder/variableFlags.h"
18 #include "varbinder/ETSBinder.h"
43 static ir::ClassDefinition *GetUnionFieldClass(checker::ETSChecker *checker, varbinder::VarBinder *varbinder) in GetUnionFieldClass() argument
47 varbinder::Variable *foundVar = nullptr; in GetUnionFieldClass()
49 varbinder::ResolveBindingOptions::BINDINGS)) != nullptr) { in GetUnionFieldClass()
53 auto [decl, var] = varbinder->NewVarDecl<varbinder::ClassDecl>(ident->Start(), ident->Name()); in GetUnionFieldClass()
56 auto classCtx = varbinder::LexicalScope<varbinder in GetUnionFieldClass()
71 CreateUnionFieldClassProperty(checker::ETSChecker *checker, varbinder::VarBinder *varbinder, checker::Type *fieldType, const util::StringView &propName) CreateUnionFieldClassProperty() argument
[all...]
H A DlocalClassLowering.cpp18 #include "varbinder/ETSBinder.h"
28 static ir::ClassProperty *CreateCapturedField(checker::ETSChecker *checker, const varbinder::Variable *capturedVar, in CreateCapturedField()
29 varbinder::ClassScope *scope, size_t &idx, in CreateCapturedField()
36 auto fieldCtx = varbinder::LexicalScope<varbinder::LocalScope>::Enter(varBinder, scope->InstanceFieldScope()); in CreateCapturedField()
50 auto [decl, var] = varBinder->NewVarDecl<varbinder::LetDecl>(pos, fieldIdent->Name()); in CreateCapturedField()
52 var->AddFlag(varbinder::VariableFlags::PROPERTY); in CreateCapturedField()
61 static ir::Statement *CreateCtorFieldInit(checker::ETSChecker *checker, util::StringView name, varbinder::Variable *var) in CreateCtorFieldInit()
83 public_lib::Context *ctx, ir::ClassDefinition *classDef, ArenaSet<varbinder::Variable *> const &capturedVars, in CreateClassPropertiesForCapturedVariables()
84 ArenaMap<varbinder in CreateClassPropertiesForCapturedVariables()
[all...]
H A DboxingForLocals.cpp18 #include "varbinder/ETSBinder.h"
25 static ArenaSet<varbinder::Variable *> FindCaptured(public_lib::Context *ctx, ir::ScriptFunction *func) in FindCaptured()
28 auto captured = ArenaSet<varbinder::Variable *>(allocator->Adapter()); in FindCaptured()
31 auto innermostArrowScopes = ArenaSet<varbinder::Scope *>(allocator->Adapter()); in FindCaptured()
38 auto savedScopes = ArenaSet<varbinder::Scope *>(allocator->Adapter()); in FindCaptured()
78 auto varsToBox = ArenaSet<varbinder::Variable *>(allocator->Adapter()); in FindCaptured()
82 static ArenaSet<varbinder::Variable *> FindModified(public_lib::Context *ctx, ir::ScriptFunction *func) in FindModified()
85 auto modified = ArenaSet<varbinder::Variable *>(allocator->Adapter()); in FindModified()
93 var->AddFlag(varbinder::VariableFlags::INITIALIZED); in FindModified()
103 static ArenaSet<varbinder
[all...]
H A DcapturedVariables.cpp25 static void AddScopes(ir::AstNode *node, std::set<varbinder::Scope *> &scopes) noexcept
39 static varbinder::Variable *FindVariable(ir::Identifier *ident, std::set<varbinder::Scope *> const &scopes) noexcept
43 // 'varbinder->IdentifierAnalysis()' pass. Probably need to be investigated and fixed sometimes...
47 auto res = (*it)->Find(ident->Name(), varbinder::ResolveBindingOptions::VARIABLES);
68 std::set<varbinder::Variable *> &variables) noexcept
70 auto scopes = std::set<varbinder::Scope *> {};
76 auto savedScopes = std::set<varbinder::Scope *> {};
105 auto variables = std::set<varbinder::Variable *> {};
109 variable->AddFlag(varbinder
[all...]
/arkcompiler/ets_frontend/ets2panda/checker/
H A DTSchecker.h20 #include "varbinder/enumMemberResult.h"
32 namespace ark::es2panda::varbinder { namespace in ark::es2panda
40 } // namespace ark::es2panda::varbinder
256 bool StartChecker([[maybe_unused]] varbinder::VarBinder *varbinder, const CompilerOptions &options) override;
280 bool IsVariableUsedInConditionBody(ir::AstNode *parent, varbinder::Variable *searchVar);
281 bool FindVariableInBinaryExpressionChain(ir::AstNode *parent, varbinder::Variable *searchVar);
282 bool IsVariableUsedInBinaryExpressionChain(ir::AstNode *parent, varbinder::Variable *searchVar);
289 void GetTypeVar(varbinder::Decl *decl);
290 void GetTypeParam(varbinder
[all...]
H A DJSchecker.cpp18 #include "varbinder/varbinder.h"
23 bool JSChecker::StartChecker([[maybe_unused]] varbinder::VarBinder *varbinder, const CompilerOptions &options) in StartChecker() argument
25 Initialize(varbinder); in StartChecker()
26 varbinder->IdentifierAnalysis(); in StartChecker()
/arkcompiler/ets_frontend/ets2panda/compiler/core/
H A DenvScope.h19 #include "varbinder/scope.h"
35 explicit ScopeContext(CodeGen *cg, varbinder::Scope *newScope);
43 varbinder::Scope *prevScope_;
78 explicit LoopEnvScope(PandaGen *pg, varbinder::LoopScope *scope, LabelTarget target) in LoopEnvScope()
81 CopyBindings(pg, scope, varbinder::VariableFlags::PER_ITERATION); in LoopEnvScope()
84 explicit LoopEnvScope(PandaGen *pg, LabelTarget target, varbinder::LoopScope *scope) in LoopEnvScope()
87 CopyBindings(pg, scope, varbinder::VariableFlags::PER_ITERATION); in LoopEnvScope()
90 explicit LoopEnvScope(PandaGen *pg, varbinder::LoopDeclarationScope *scope) in LoopEnvScope()
93 CopyBindings(pg, scope, varbinder::VariableFlags::LOOP_DECL);
96 varbinder
[all...]
/arkcompiler/ets_frontend/ets2panda/checker/types/ts/
H A DenumType.h22 namespace ark::es2panda::varbinder { namespace in ark::es2panda
24 } // namespace ark::es2panda::varbinder
29 EnumType(varbinder::Variable *enumLiteralVar, varbinder::EnumVariable *enumVar) in EnumType()
34 const varbinder::Variable *EnumLiteralVar() const in EnumLiteralVar()
39 const varbinder::EnumVariable *EnumVar() const in EnumVar()
51 varbinder::Variable *enumLiteralVar_;
52 varbinder::EnumVariable *enumVar_;
H A DinterfaceType.h47 void SetMergedTypeParams(std::pair<std::vector<varbinder::Variable *>, size_t> &&mergedTypeParams) in SetMergedTypeParams()
52 const std::pair<std::vector<varbinder::Variable *>, size_t> &GetMergedTypeParams() const in GetMergedTypeParams()
67 varbinder::LocalVariable *GetProperty(const util::StringView &name,
70 varbinder::LocalVariable *resultProp = ObjectType::GetProperty(name, false);
124 ArenaVector<varbinder::LocalVariable *> Properties() override
126 ArenaVector<varbinder::LocalVariable *> properties(allocator_->Adapter());
134 bool CheckVarType(TypeRelation *relation, const ArenaVector<varbinder::LocalVariable *> &targetProperties,
135 const ArenaVector<varbinder::LocalVariable *> &sourceProperties);
140 void CollectProperties(ArenaVector<varbinder::LocalVariable *> *collectedProperties) const;
148 std::pair<std::vector<varbinder
[all...]
/arkcompiler/ets_frontend/ets2panda/test/unit/dynamic/
H A Ddynamic_call_test.cpp38 Allocator()->New<parser::Program>(Allocator(), Allocator()->New<varbinder::ETSBinder>(Allocator())); in ParseExpr()
82 void AddDynImport(const char *specifierName, varbinder::ETSBinder *varbinder, ir::Identifier *node) in AddDynImport() argument
93 compiler::InitScopesPhaseETS::RunExternalNode(importDecl, varbinder); in AddDynImport()
94 varbinder->BuildImportDeclaration(importDecl); in AddDynImport()
95 auto var = varbinder->TopScope()->Find(specifierName); in AddDynImport()
118 auto varbinder = prog->VarBinder()->AsETSBinder(); in TEST_F() local
120 // With empty varbinder A is local variable in TEST_F()
121 auto [finalObj, callName] = checker::DynamicCall::ResolveCall(varbinder, obj); in TEST_F()
125 AddDynImport("A", varbinder, firs in TEST_F()
139 auto varbinder = prog->VarBinder()->AsETSBinder(); TEST_F() local
159 auto varbinder = program->VarBinder()->AsETSBinder(); TEST_F() local
178 auto varbinder = program->VarBinder()->AsETSBinder(); TEST_F() local
188 auto varbinder = program->VarBinder()->AsETSBinder(); TEST_F() local
[all...]
/arkcompiler/ets_frontend/ets2panda/varbinder/
H A Dvarbinder.h19 #include "varbinder/scope.h"
20 #include "varbinder/variableFlags.h"
50 namespace ark::es2panda::varbinder { namespace in ark::es2panda::ark::es2panda::ark::es2panda::ark::es2panda
71 std::tuple<T *, varbinder::Variable *> NewVarDecl(const lexer::SourcePosition &pos, Args &&...args);
240 void BuildForInOfLoop(varbinder::LoopScope *loopScope, ir::AstNode *left, ir::Expression *right,
249 void AddCompilableFunctionScope(varbinder::FunctionScope *funcScope);
281 explicit LexicalScope(VarBinder *varbinder, Args &&...args) in LexicalScope() argument
283 varbinder->Allocator()->New<T>(varbinder->Allocator(), varbinder in LexicalScope()
300 Enter(VarBinder *varbinder, T *scope, bool checkEval = true) Enter() argument
337 LexicalScope(T *scope, VarBinder *varbinder) LexicalScope() argument
[all...]
/arkcompiler/ets_frontend/ets2panda/checker/ts/
H A Dhelpers.cpp29 #include "varbinder/variable.h"
30 #include "varbinder/scope.h"
102 if (result.variable->HasFlag(varbinder::VariableFlags::ENUM_LITERAL)) { in CheckReferenceExpression()
220 bool TSChecker::IsVariableUsedInConditionBody(ir::AstNode *parent, varbinder::Variable *searchVar) in IsVariableUsedInConditionBody()
225 varbinder::Variable *resultVar = nullptr; in IsVariableUsedInConditionBody()
245 bool TSChecker::FindVariableInBinaryExpressionChain(ir::AstNode *parent, varbinder::Variable *searchVar) in FindVariableInBinaryExpressionChain()
265 bool TSChecker::IsVariableUsedInBinaryExpressionChain(ir::AstNode *parent, varbinder::Variable *searchVar) in IsVariableUsedInBinaryExpressionChain()
340 varbinder::Variable *var = declarator->Id()->AsIdentifier()->Variable(); in InferSimpleVariableDeclaratorType()
357 void TSChecker::GetTypeVar(varbinder::Decl *decl) in GetTypeVar()
371 void TSChecker::GetTypeParam(varbinder
[all...]
H A Dfunction.cpp32 #include "varbinder/variable.h"
33 #include "varbinder/scope.h"
34 #include "varbinder/declaration.h"
119 std::tuple<varbinder::LocalVariable *, varbinder::LocalVariable *, bool> TSChecker::CheckFunctionIdentifierParameter( in CheckFunctionIdentifierParameter()
123 varbinder::Variable *paramVar = param->Variable(); in CheckFunctionIdentifierParameter()
131 paramVar->AddFlag(varbinder::VariableFlags::OPTIONAL); in CheckFunctionIdentifierParameter()
157 varbinder::LocalVariable *newMember = varbinder::Scope::CreateVar( in CreateParameterTypeForArrayAssignmentPattern()
158 Allocator(), memberIndex, varbinder in CreateParameterTypeForArrayAssignmentPattern()
[all...]
H A Dobject.cpp34 #include "varbinder/variable.h"
35 #include "varbinder/scope.h"
52 const ArenaVector<varbinder::LocalVariable *> &properties = objType->Properties(); in CheckIndexConstraints()
56 if (it->HasFlag(varbinder::VariableFlags::NUMERIC_NAME)) { in CheckIndexConstraints()
200 varbinder::Variable *prop = member->AsTSPropertySignature()->Variable(); in ResolvePropertiesOfObjectType()
211 varbinder::Variable *method = member->AsTSMethodSignature()->Variable(); in ResolvePropertiesOfObjectType()
271 varbinder::Variable *TSChecker::GetPropertyOfType(Type *type, const util::StringView &name, bool getPartial, in GetPropertyOfType()
272 varbinder::VariableFlags propagateFlags) in GetPropertyOfType()
286 varbinder::Variable *TSChecker::GetPropertyOfUnionType(UnionType *type, const util::StringView &name, bool getPartial, in GetPropertyOfUnionType()
287 varbinder in GetPropertyOfUnionType()
[all...]
/arkcompiler/ets_frontend/ets2panda/parser/program/
H A Dprogram.h24 #include "varbinder/varbinder.h"
34 namespace ark::es2panda::varbinder { namespace in ark::es2panda::ark::es2panda
36 } // namespace ark::es2panda::varbinder
51 auto *varbinder = allocator->New<T>(allocator); in NewProgram() local
52 return Program(allocator, varbinder); in NewProgram()
55 Program(ArenaAllocator *allocator, varbinder::VarBinder *varbinder) in Program() argument
57 varbinder_(varbinder), in Program()
60 extension_(varbinder in Program()
[all...]
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/
H A DresolveIdentifiers.cpp18 #include "varbinder/ETSBinder.h"
24 auto *varbinder = ctx->parserProgram->VarBinder()->AsETSBinder(); in Perform() local
27 std::cout << varbinder->Program()->Dump() << std::endl; in Perform()
31 varbinder->Program()->DumpSilent(); in Perform()
39 varbinder->SetGenStdLib(options.compilationMode == CompilationMode::GEN_STD_LIB); in Perform()
40 varbinder->IdentifierAnalysis(); in Perform()
/arkcompiler/ets_frontend/ets2panda/checker/ets/dynamic/
H A DdynamicCall.h21 #include "varbinder/ETSBinder.h"
37 * @param varbinder
41 static Result ResolveCall(const varbinder::ETSBinder *varbinder, const ir::Expression *callee);
42 static bool IsByValue(const varbinder::ETSBinder *varbinder, const ir::Expression *callee) in IsByValue() argument
44 return ResolveCall(varbinder, callee).name.empty(); in IsByValue()
/arkcompiler/ets_frontend/ets2panda/compiler/base/
H A Dlreference.h19 #include "varbinder/scope.h"
66 varbinder::Variable *Variable() const in Variable()
76 varbinder::ConstScopeFindResult &Result() in Result()
81 const varbinder::ConstScopeFindResult &Result() const in Result()
93 std::tuple<CodeGen *, const ir::AstNode *, ReferenceKind, varbinder::ConstScopeFindResult, bool>;
96 explicit LReference(const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFindResult res, in LReference()
105 varbinder::ConstScopeFindResult res_;
111 JSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFindResult res,
134 ETSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind, varbinder::ConstScopeFindResult res,
144 static ReferenceKind ResolveReferenceKind(const varbinder
[all...]
H A Dhoisting.cpp19 #include "varbinder/scope.h"
23 static void HoistVar(PandaGen *pg, varbinder::Variable *var, const varbinder::VarDecl *decl) in HoistVar()
33 varbinder::ConstScopeFindResult result(decl->Name(), scope, 0, var); in HoistVar()
39 static void HoistFunction(PandaGen *pg, varbinder::Variable *var, const varbinder::FunctionDecl *decl) in HoistFunction()
53 varbinder::ConstScopeFindResult result(decl->Name(), scope, 0, var); in HoistFunction()
65 if (!var->HasFlag(varbinder::VariableFlags::HOIST)) { in Hoist()
H A Dlexenv.cpp18 #include "varbinder/variable.h"
32 static void CheckConstAssignment(PandaGen *pg, const ir::AstNode *node, varbinder::Variable *variable) in CheckConstAssignment()
43 static void ExpandLoadLexVar(PandaGen *pg, const ir::AstNode *node, const varbinder::ConstScopeFindResult &result) in ExpandLoadLexVar()
52 static void ExpandLoadNormalVar(PandaGen *pg, const ir::AstNode *node, const varbinder::ConstScopeFindResult &result) in ExpandLoadNormalVar()
63 void VirtualLoadVar::Expand(PandaGen *pg, const ir::AstNode *node, const varbinder::ConstScopeFindResult &result) in Expand()
74 static void StoreLocalExport(PandaGen *pg, const ir::AstNode *node, varbinder::Variable *variable) in StoreLocalExport()
76 if (!variable->HasFlag(varbinder::VariableFlags::LOCAL_EXPORT) || !pg->Scope()->IsModuleScope()) { in StoreLocalExport()
89 static void ExpandStoreLexVar(PandaGen *pg, const ir::AstNode *node, const varbinder::ConstScopeFindResult &result, in ExpandStoreLexVar()
92 varbinder::LocalVariable *local = result.variable->AsLocalVariable(); in ExpandStoreLexVar()
109 static void ExpandStoreNormalVar(PandaGen *pg, const ir::AstNode *node, const varbinder
[all...]
/arkcompiler/ets_frontend/ets2panda/checker/types/ets/
H A DetsObjectType.h24 #include "varbinder/scope.h"
28 using PropertyProcesser = std::function<varbinder::LocalVariable *(varbinder::LocalVariable *, Type *)>;
31 using PropertyMap = ArenaUnorderedMap<util::StringView, varbinder::LocalVariable *>;
33 using PropertyTraverser = std::function<void(const varbinder::LocalVariable *)>;
237 bool IsPropertyInherited(const varbinder::Variable *var);
239 bool IsPropertyOfAscendant(const varbinder::Variable *var) const;
308 varbinder::Scope *GetTypeArgumentScope() const in GetTypeArgumentScope()
323 varbinder::LocalVariable *GetOwnProperty(const util::StringView &name) const in GetOwnProperty()
334 void AddProperty(varbinder
[all...]
/arkcompiler/ets_frontend/ets2panda/evaluate/
H A DvarbinderScopes.h20 #include "varbinder/ETSBinder.h"
21 #include "varbinder/recordTable.h"
28 explicit ProgramScope(varbinder::ETSBinder *varBinder, parser::Program *program) in ProgramScope()
63 varbinder::ETSBinder *varBinder_ {nullptr};
65 varbinder::RecordTable *prevRecordTable_ {nullptr};
66 varbinder::GlobalScope *prevTopScope_ {nullptr};
67 varbinder::VariableScope *prevVarScope_ {nullptr};
68 varbinder::Scope *prevScope_ {nullptr};
75 explicit RecordTableClassScope(varbinder::ETSBinder *varBinder, ir::AstNode *recordClass) : varBinder_(varBinder) in RecordTableClassScope()
124 varbinder
[all...]

Completed in 11 milliseconds

12345678910