Lines Matching refs:var
31 auto *var = pg->Scope()->FindLocal(decl->Name()); in StoreModuleVarOrLocalVar() local
32 ASSERT(var->IsModuleVariable()); in StoreModuleVarOrLocalVar()
33 pg->StoreModuleVariable(decl->Node(), var->AsModuleVariable()); in StoreModuleVarOrLocalVar()
39 static void HoistVar(PandaGen *pg, binder::Variable *var, const binder::VarDecl *decl) in HoistVar() argument
57 binder::ScopeFindResult result(decl->Name(), scope, 0, var); in HoistVar()
63 static void HoistFunction(PandaGen *pg, binder::Variable *var, const binder::FunctionDecl *decl) in HoistFunction() argument
74 pg->StoreGlobalVar(decl->Node(), var->Declaration()->Name()); in HoistFunction()
80 binder::ScopeFindResult result(decl->Name(), scope, 0, var); in HoistFunction()
92 auto *var = pg->TopScope()->FindLocal(nameSpaceEntry->localName_); in HoistNameSpaceImports() local
93 ASSERT(var != nullptr); in HoistNameSpaceImports()
94 auto *node = var->Declaration()->Node(); in HoistNameSpaceImports()
97 pg->StoreVar(node, {nameSpaceEntry->localName_, pg->TopScope(), 0, var}, true); in HoistNameSpaceImports()
106 for (const auto &[_, var] : scope->Bindings()) { in Hoist()
108 if (!var->HasFlag(binder::VariableFlags::HOIST)) { in Hoist()
112 const auto *decl = var->Declaration(); in Hoist()
115 HoistVar(pg, var, decl->AsVarDecl()); in Hoist()
118 HoistFunction(pg, var, decl->AsFunctionDecl()); in Hoist()