Lines Matching defs:currScope
512 Scope &currScope() { return DEREF(currScope_); }
564 return FindInScope(currScope(), name);
572 void EraseSymbol(const Symbol &symbol) { currScope().erase(symbol.name()); }
612 &currScope().MakeSymbol(name, attrs, std::move(details));
631 specific = &currScope().MakeSymbol(name, attrs, std::move(details));
757 if (!add && deferred_.find(&currScope()) == deferred_.end()) {
760 return &deferred_.emplace(&currScope(), DeferredDeclarationState{})
1411 currScope().AddSourceRange(source);
1642 currScope().AddSourceRange(source);
1692 if (auto *symbol{FindSymbol(currScope(), mapper->v)}) {
2385 if (info && &info->scope == &scopeHandler_.currScope()) {
2417 if (!stack_.empty() && &stack_.back().scope == &scopeHandler_.currScope()) {
2533 Scope &ScopeHandler::InclusiveScope() { return GetInclusiveScope(currScope()); }
2552 PushScope(currScope().MakeScope(kind, symbol));
2590 for (auto &pair : currScope()) {
2606 return FindSymbol(currScope(), name);
2638 return MakeSymbol(currScope(), name, attrs);
2665 return MakeSymbol(currScope(), name, symbol.attrs());
2691 return FindInTypeOrParents(currScope(), name);
2709 currScope().erase(name.source);
2829 scope = &currScope();
2838 instantiatable.Instantiate(currScope());
2944 auto kind{currScope().kind()};
2945 if ((kind == Scope::Kind::Subprogram && !currScope().IsStmtFunction()) ||
2947 bool isHostAssociated{&name.symbol->owner() == &currScope()
2949 : name.symbol->owner().Contains(currScope())};
3128 } else if (currScope().IsModule() && currScope().symbol() &&
3129 currScope().symbol()->attrs().test(Attr::INTRINSIC)) {
3193 !FindModuleFileContaining(currScope())) {
3455 // Restore *localSymbol in currScope
3456 auto iter{currScope().find(localName)};
3457 CHECK(iter != currScope().end() && &*iter->second == newSymbol);
3471 &currScope().MakeSymbol(localSymbol->name(), useDerivedType->attrs(),
3614 Symbol &combined{currScope().MakeSymbol(localSymbol->name(),
3691 currScope().MakeSymbol(name, {}, UseDetails{name, useSymbol})};
3740 SourceName dummyName{context().GetTempName(currScope())};
3743 parentScope = &currScope();
3747 if (ancestor && !ancestor->AddSubmodule(name.source, currScope())) {
3757 currScope().MakeSymbol(name.source, Attrs{},
3762 details.set_scope(&currScope());
3776 if (DoesScopeContain(scope, currScope())) { // 14.2.2(1)
3778 if (const Scope * container{FindModuleOrSubmoduleContaining(currScope())};
3797 DEREF(currScope().symbol()).detailsIf<ModuleDetails>()};
3801 for (auto &pair : currScope()) {
4057 (&symbol->owner() == &currScope() && IsFunctionResult(*symbol))) {
4061 if (IsHostAssociated(*symbol, currScope())) {
4086 if (auto *dummySymbol{FindInScope(currScope().parent(), dummyName)}) {
4113 if (IsFunction(currScope())) {
4158 if (auto *subp{currScope().symbol()
4159 ? currScope().symbol()->detailsIf<SubprogramDetails>()
4191 const Scope &scope{currScope()};
4202 if (!currScope().FindSymbol(sym->name())) {
4227 } else if (auto *subp{currScope().symbol()
4228 ? currScope().symbol()->detailsIf<SubprogramDetails>()
4252 } else if (auto *subp{currScope().symbol()
4253 ? currScope().symbol()->detailsIf<SubprogramDetails>()
4350 CHECK(context().HasError(currScope().symbol()));
4356 if (auto iter{currScope().find(funcResultName->source)};
4357 iter != currScope().end()) {
4396 Symbol &symbol{*currScope().symbol()};
4440 Scope &outer{currScope().parent()};
4497 entryDetails.set_entryScope(currScope());
4506 if (auto iter{currScope().find(suffix->resultName->source)};
4507 iter != currScope().end()) {
4630 if (currScope().IsSubmodule()) {
4631 parent = currScope().symbol()->get<ModuleDetails>().parent();
4657 if (symbol->owner() == currScope() && symbol->scope()) {
4678 MapSubprogramToNewSymbols(*symbol, newSymbol, currScope());
4689 if (hasModulePrefix && !currScope().IsModule() &&
4690 !currScope().IsSubmodule()) { // C1547
4701 if (moduleInterface && &moduleInterface->owner() == &currScope()) {
4752 HandleLanguageBinding(currScope().symbol(), stmtSource, binding);
4763 if (inInterfaceBlock() && currScope().symbol()) {
4764 DeclaredPossibleSpecificProc(*currScope().symbol());
4821 } else if (inInterfaceBlock() && currScope() != prev->owner()) {
4835 if (bindingSpec && currScope().IsGlobal() &&
4843 &MakeSymbol(context().GetTempName(currScope()), Attrs{},
4853 funcResultStack().Push(currScope(), name.source);
4904 if (auto *symbol{currScope().FindSymbol(name.source)}) {
4944 specific = &currScope().MakeSymbol(
5038 if (auto *scopeSymbol{currScope().symbol()}) {
5127 if (const auto *type{currScope().GetType(*folded)}) {
5360 (currScope().kind() == Scope::Kind::Subprogram ||
5361 currScope().kind() == Scope::Kind::BlockConstruct)) {
5390 if (currScope().kind() == Scope::Kind::BlockConstruct) {
5466 currScope().MakeSymbol(name.source, attrs, ProcEntityDetails{}));
5574 SetDeclTypeSpec(currScope().MakeCharacterType(
5630 if (!currScope().context().targetCharacteristics().isPPC()) {
5695 auto ppcBuiltinTypesScope = currScope().context().GetPPCBuiltinTypesScope();
5801 DeclTypeSpec &type{currScope().MakeDerivedType(category, std::move(*spec))};
5811 extant{currScope().FindInstantiatedDerivedType(*spec, category)}) {
5816 DeclTypeSpec &type{currScope().MakeDerivedType(category, std::move(*spec))};
5819 currScope().IsParameterizedDerivedType()) {
5822 } else if (&currScope() == spec->typeSymbol().scope()) {
5828 derived.Instantiate(currScope());
5843 extant{currScope().FindInstantiatedDerivedType(
5860 auto &scope{currScope()};
5934 DeclTypeSpec &type{currScope().MakeDerivedType(
5957 if (Symbol * dtSym{currScope().symbol()}) {
5963 if (Symbol * symbol{FindInScope(currScope(), name)}) {
6001 if (!currScope().parent().IsModule()) {
6073 currScope().symbol()->get<DerivedTypeDetails>().add_component(symbol);
6081 const_cast<SourceName &>(name.source) = context().GetTempName(currScope());
6084 currScope().symbol()->get<DerivedTypeDetails>().add_component(symbol);
6171 if (Symbol * symbol{currScope().symbol()}) {
6257 CHECK(currScope().IsDerivedType());
6306 if (currScope().IsDerivedType() && currScope().symbol()) {
6307 if (auto *details{currScope().symbol()->detailsIf<DerivedTypeDetails>()}) {
6313 currScope().parent(), subrName.source, Attrs{Attr::MODULE});
6348 if (Symbol * inherited{currScope().FindComponent(SourceName{name})}) {
6388 previousStructure = &currScope();
6397 parser::Name{context().GetTempName(currScope()), nullptr});
6413 DeclTypeSpec &type{currScope().MakeDerivedType(
6415 type.derivedTypeSpec().Instantiate(currScope());
6550 currScope().add_crayPointer(pointeeName.source, *pointer);
6660 currScope().add_equivalenceSet(std::move(set));
6669 currScope().set_hasSAVE();
6703 if (auto *symbol{currScope().FindCommonBlock(name)}) {
6706 if (currScope().kind() != Scope::Kind::BlockConstruct) {
6750 for (const auto &pair : currScope().commonBlocks()) {
6761 const auto *symbol{currScope().FindSymbol(name)};
6800 return Resolve(name, currScope().MakeCommonBlock(name.source));
6894 if (symbol.owner() == currScope()) { // C1125 and C1126
6959 name.source, currScope(), DefinabilityFlags{}, symbol)}) {
6997 if (prev->owner() == currScope()) {
7036 currScope().MakeCharacterType(std::move(length), std::move(kind)));
7172 Scope &derivedType{currScope()};
7198 for (const Scope *scope{&currScope()}; scope;) {
7207 } else if (CheckAccessibleSymbol(currScope(), *prev)) {
7218 } else if (scope == &currScope()) {
7237 if (scope == &currScope() && extends) {
7269 if (prev->owner() == currScope()) {
7410 bool pushScope{currScope().kind() != Scope::Kind::ImpliedDos};
7731 if (Symbol * inner{FindInScope(currScope(), *x)}) {
7761 if (symbol->has<AssocEntityDetails>() && symbol->owner() == currScope()) {
7869 return currScope().MakeTypeStarType();
7871 return currScope().MakeClassStarType();
7873 return currScope().MakeDerivedType(
7889 return currScope().MakeCharacterType(
7893 return currScope().MakeCharacterType(
8162 if (Symbol * symbol{currScope().FindSymbol(name)}) {
8164 if (&symbol->owner() != &currScope()) {
8165 symbol = &*currScope()
8191 auto &scope{currScope()};
8373 if (currScope().CanImport(name.source)) {
8402 if (symbolUnit == GetProgramUnitContaining(currScope())) {
8462 derived->Instantiate(currScope()); // in case of forward referenced type
8465 if (auto msg{CheckAccessibleSymbol(currScope(), *component.symbol)}) {
8490 if (!currScope().IsTopLevel()) {
8494 for (auto *scope = &currScope().parent();; scope = &scope->parent()) {
8498 const auto [sym, success]{currScope().try_emplace(
8741 currScope().context().GetPPCBuiltinsScope()) {
8830 if (Symbol * symbol{currScope().FindSymbol(name)}) {
8906 if (!currScope().IsModule()) { // C869
8919 auto *moduleDetails{DEREF(currScope().symbol()).detailsIf<ModuleDetails>()};
9066 if (FindCUDADeviceContext(&currScope())) {
9146 existing = currScope().FindSymbol(SourceName{n});
9154 if (&existing->owner() == &currScope()) {
9185 } else if (&existing->owner() == &currScope()) {
9189 if (&existing->owner() == &currScope()) {
9201 for (auto &pair : currScope()) {
9236 currScope().InstantiateDerivedTypes();
9265 &symbol->scope()->parent() != &currScope() || details->isInterface() ||
9294 auto &scope{currScope()};
9322 if (&ultimate.owner() == &currScope()) {
9467 if (currScope().IsTopLevel() ||
9468 GetProgramUnitContaining(currScope()).kind() !=
9480 Symbol *symbol{currScope().symbol()};
9536 if (symbol->owner() != currScope()) {
9729 Scope &scope{currScope()};
9837 if (currScope().find(name->source) != currScope().end()) {
9924 outerScope_ = &resolver_.currScope();
10018 for (Scope &childScope : currScope().children()) {
10046 spec->Instantiate(currScope());