Lines Matching refs:cg

36 LReference::LReferenceBase LReference::CreateBase(CodeGen *cg, const ir::AstNode *node, bool isDeclaration)
42 auto res = cg->Scope()->Find(name, varbinder::ResolveBindingOptions::ALL);
47 return {cg, node, ReferenceKind::VAR_OR_GLOBAL, res, isDeclaration};
50 return {cg, node, ReferenceKind::MEMBER, {}, false};
54 return CreateBase(cg, node->AsVariableDeclaration()->Declarators()[0]->Id(), true);
57 return CreateBase(cg, node->AsVariableDeclarator()->Id(), true);
61 return {cg, node, ReferenceKind::DESTRUCTURING, {}, isDeclaration};
64 return CreateBase(cg, node->AsAssignmentPattern()->Left(), true);
67 return CreateBase(cg, node->AsRestElement()->Argument(), true);
70 return CreateBase(cg, node->AsTSNonNullExpression()->Expr(), isDeclaration);
78 JSLReference::JSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind,
80 : LReference(node, refKind, res, isDeclaration), pg_(static_cast<PandaGen *>(cg))
175 ETSLReference::ETSLReference(CodeGen *cg, const ir::AstNode *node, ReferenceKind refKind,
177 : LReference(node, refKind, res, isDeclaration), etsg_(static_cast<ETSGen *>(cg))
206 ETSLReference ETSLReference::Create(CodeGen *const cg, const ir::AstNode *const node, const bool isDeclaration)
219 return {cg, node, refKind, res, isDeclaration};
223 auto res = cg->Scope()->FindInFunctionScope(name, varbinder::ResolveBindingOptions::ALL);
225 res = cg->Scope()->FindInGlobal(name, varbinder::ResolveBindingOptions::ALL_VARIABLES |
229 return {cg, node, ReferenceKind::VAR_OR_GLOBAL, res, isDeclaration};
231 return std::make_from_tuple<ETSLReference>(CreateBase(cg, node, isDeclaration));