Lines Matching full:scope
26 static void AddScopes(ir::AstNode *node, std::set<varbinder::Scope *> &scopes) noexcept in AddScopes()
28 if (node->Scope()->IsFunctionScope()) { in AddScopes()
29 scopes.emplace(node->Scope()->AsFunctionScope()->ParamScope()); in AddScopes()
31 if (node->Scope()->IsCatchScope()) { in AddScopes()
32 scopes.emplace(node->Scope()->AsCatchScope()->ParamScope()); in AddScopes()
34 if (node->Scope()->IsLoopScope()) { in AddScopes()
35 scopes.emplace(node->Scope()->AsLoopScope()->DeclScope()); in AddScopes()
37 scopes.emplace(node->Scope()); in AddScopes()
40 static varbinder::Variable *FindVariable(ir::Identifier *ident, std::set<varbinder::Scope *> const … in FindVariable()
43 …// NOTE! For some unknown reasons :) variables exist in scope collections but are not set to iden… in FindVariable()
46 // We start from the innermost scope! in FindVariable()
57 auto *scope = var->GetScope(); in FindVariable() local
58 ES2PANDA_ASSERT(scope != nullptr); in FindVariable()
60 if (scopes.find(scope) != scopes.cend()) { in FindVariable()
71 auto scopes = std::set<varbinder::Scope *> {}; in FindModifiedCaptured()
77 auto savedScopes = std::set<varbinder::Scope *> {}; in FindModifiedCaptured()