Skip to content

[Name lookup] Use decl-based name lookup more regularly #18539

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 14, 2018

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Aug 7, 2018

Avoid the use of the type checker in much of name lookup, relying on Decl-level information (not Type-level information) instead. There are several changes here that support each other to get back to a usable state:

  • Use decl-based name lookup for unqualified lookup: replace uses of the Type form of lookupQualified (where the type was usually provided by getSelfTypeInContext()) with the "decl" form of the method, so we don't need to resolve types to perform unqualified name lookup.
  • Use declaration-based name lookup in the conformance lookup table: similar to the above, allows us to determine the set of protocols to which a nominal type conforms using only Decl-level information.

With these changes, eliminate LazyResolver::resolveExtensionForConformanceConstruction() and some of the type-checker logic supporting it.

@@ -2201,8 +2277,6 @@ directReferencesForTypeRepr(Evaluator &evaluator,
}
}

/// Retrieve the set of type declarations that are directly referenced from
/// the given type.
static DirectlyReferencedTypeDecls
directReferencesForType(Type type) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it could fit on one line

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Will do in a follow-up

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DougGregor DougGregor force-pushed the unqualified-lookup-via-decls branch from 65bfccd to 7b3fad8 Compare August 7, 2018 06:48
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@swift-ci
Copy link
Contributor

swift-ci commented Aug 7, 2018

Build failed
Swift Test Linux Platform
Git Sha - 7b3fad8a7a18b4b18eb4abf27359ae120b7ff9ca

@swift-ci
Copy link
Contributor

swift-ci commented Aug 7, 2018

Build failed
Swift Test OS X Platform
Git Sha - 7b3fad8a7a18b4b18eb4abf27359ae120b7ff9ca

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

@swift-ci please test compiler performance

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test compiler performance

@swift-ci
Copy link
Contributor

swift-ci commented Aug 8, 2018

Build comment file:

Summary for master full

Unexpected test results, excluded stats for RxSwift, ReactiveCocoa, Wordy, DatabaseKit, ReactiveSwift

Regressions found (see below)

Debug-batch

debug-batch brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 504,388,310 504,581,374 193,064 0.04%
time.swift-driver.wall 1170.3s 1169.5s -787.2ms -0.07%

debug-batch detailed

Regressed (6)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 805,702 824,500 18,798 2.33% ⛔
AST.NumTotalClangImportedEntities 2,626,009 2,704,078 78,069 2.97% ⛔
Sema.NamedLazyMemberLoadFailureCount 14,608 15,999 1,391 9.52% ⛔
Sema.NamedLazyMemberLoadSuccessCount 2,395,213 2,584,041 188,828 7.88% ⛔
Sema.NominalTypeLookupDirectCount 17,485,912 17,751,135 265,223 1.52% ⛔
Sema.NumFunctionsTypechecked 471,105 477,324 6,219 1.32% ⛔
Improved (1)
name old new delta delta_pct
Sema.InheritedTypeRequest 27,387 26,183 -1,204 -4.4% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (80)
name old new delta delta_pct
AST.NumASTBytesAllocated 13,687,900,650 13,740,655,514 52,754,864 0.39%
AST.NumDecls 33,060 33,060 0 0.0%
AST.NumDependencies 88,576 88,576 0 0.0%
AST.NumInfixOperators 13,323 13,323 0 0.0%
AST.NumLinkLibraries 0 0 0 0.0%
AST.NumLoadedModules 100,529 100,529 0 0.0%
AST.NumLocalTypeDecls 13 13 0 0.0%
AST.NumObjCMethods 12,906 12,906 0 0.0%
AST.NumPostfixOperators 14 14 0 0.0%
AST.NumPrecedenceGroups 6,996 6,996 0 0.0%
AST.NumPrefixOperators 60 60 0 0.0%
AST.NumReferencedDynamicNames 45 45 0 0.0%
AST.NumReferencedMemberNames 1,907,334 1,909,069 1,735 0.09%
AST.NumReferencedTopLevelNames 115,805 115,785 -20 -0.02%
AST.NumSourceBuffers 151,372 151,366 -6 -0.0%
AST.NumSourceLines 1,198,590 1,198,590 0 0.0%
AST.NumSourceLinesPerSecond 677,081 676,969 -112 -0.02%
AST.NumUsedConformances 101,090 101,090 0 0.0%
Driver.ChildrenMaxRSS 34,553,944,064 34,661,335,040 107,390,976 0.31%
Driver.DriverDepCascadingDynamic 0 0 0 0.0%
Driver.DriverDepCascadingExternal 0 0 0 0.0%
Driver.DriverDepCascadingMember 0 0 0 0.0%
Driver.DriverDepCascadingNominal 0 0 0 0.0%
Driver.DriverDepCascadingTopLevel 0 0 0 0.0%
Driver.DriverDepDynamic 0 0 0 0.0%
Driver.DriverDepExternal 0 0 0 0.0%
Driver.DriverDepMember 0 0 0 0.0%
Driver.DriverDepNominal 0 0 0 0.0%
Driver.DriverDepTopLevel 0 0 0 0.0%
Driver.NumDriverJobsRun 7,072 7,072 0 0.0%
Driver.NumDriverJobsSkipped 0 0 0 0.0%
Driver.NumDriverPipePolls 85,442 85,261 -181 -0.21%
Driver.NumDriverPipeReads 88,441 88,209 -232 -0.26%
Driver.NumProcessFailures 0 0 0 0.0%
Frontend.NumProcessFailures 0 0 0 0.0%
IRModule.NumIRAliases 26,417 26,417 0 0.0%
IRModule.NumIRBasicBlocks 1,746,605 1,746,836 231 0.01%
IRModule.NumIRComdatSymbols 0 0 0 0.0%
IRModule.NumIRFunctions 950,499 950,926 427 0.04%
IRModule.NumIRGlobals 1,150,529 1,151,242 713 0.06%
IRModule.NumIRIFuncs 0 0 0 0.0%
IRModule.NumIRInsts 20,353,257 20,357,310 4,053 0.02%
IRModule.NumIRNamedMetaData 34,928 34,928 0 0.0%
IRModule.NumIRValueSymbols 1,821,448 1,822,357 909 0.05%
LLVM.NumLLVMBytesOutput 504,388,310 504,581,374 193,064 0.04%
Parse.NumFunctionsParsed 63,471 63,471 0 0.0%
SILModule.NumSILGenDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILGenFunctions 921,509 922,645 1,136 0.12%
SILModule.NumSILGenGlobalVariables 14,900 14,900 0 0.0%
SILModule.NumSILGenVtables 3,966 3,966 0 0.0%
SILModule.NumSILGenWitnessTables 18,802 18,802 0 0.0%
SILModule.NumSILOptDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILOptFunctions 709,172 709,425 253 0.04%
SILModule.NumSILOptGlobalVariables 15,334 15,334 0 0.0%
SILModule.NumSILOptVtables 7,636 7,636 0 0.0%
SILModule.NumSILOptWitnessTables 36,779 36,779 0 0.0%
Sema.AccessLevelRequest 929,616 929,091 -525 -0.06%
Sema.DefaultAndMaxAccessLevelRequest 21,506 21,506 0 0.0%
Sema.EnumRawTypeRequest 7,766 7,761 -5 -0.06%
Sema.ExtendedNominalRequest 1,484,718 1,492,992 8,274 0.56%
Sema.InheritedDeclsReferencedRequest 57,654,206 58,140,026 485,820 0.84%
Sema.IsDynamicRequest 730,242 730,324 82 0.01%
Sema.IsObjCRequest 656,221 654,338 -1,883 -0.29%
Sema.NumConformancesDeserialized 2,448,983 2,451,067 2,084 0.09%
Sema.NumConstraintScopes 7,334,849 7,337,329 2,480 0.03%
Sema.NumConstraintsConsideredForEdgeContraction 13,151,259 13,156,219 4,960 0.04%
Sema.NumDeclsDeserialized 16,636,782 16,735,638 98,856 0.59%
Sema.NumDeclsValidated 1,036,866 1,034,624 -2,242 -0.22%
Sema.NumGenericSignatureBuilders 798,641 797,046 -1,595 -0.2%
Sema.NumLazyGenericEnvironments 3,103,164 3,108,256 5,092 0.16%
Sema.NumLazyGenericEnvironmentsLoaded 310,654 312,272 1,618 0.52%
Sema.NumLazyIterableDeclContexts 2,814,361 2,824,582 10,221 0.36%
Sema.NumTypesDeserialized 17,365,855 17,455,850 89,995 0.52%
Sema.NumTypesValidated 874,484 874,464 -20 -0.0%
Sema.NumUnloadedLazyIterableDeclContexts 1,914,563 1,909,732 -4,831 -0.25%
Sema.OverriddenDeclsRequest 1,502,466 1,506,990 4,524 0.3%
Sema.SetterAccessLevelRequest 56,103 56,103 0 0.0%
Sema.SuperclassDeclRequest 44,238,546 44,627,706 389,160 0.88%
Sema.SuperclassTypeRequest 15,768 15,768 0 0.0%
Sema.UnderlyingTypeDeclsReferencedRequest 2,602,533 2,613,203 10,670 0.41%

Release

release brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 478,986,010 478,985,964 -46 -0.0%
time.swift-driver.wall 2128.5s 2127.5s -1.0s -0.05%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (23)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 146,062 146,166 104 0.07%
AST.NumLoadedModules 6,370 6,370 0 0.0%
AST.NumTotalClangImportedEntities 464,990 465,540 550 0.12%
AST.NumUsedConformances 103,289 103,289 0 0.0%
IRModule.NumIRBasicBlocks 1,710,346 1,710,346 0 0.0%
IRModule.NumIRFunctions 766,966 766,966 0 0.0%
IRModule.NumIRGlobals 883,648 883,648 0 0.0%
IRModule.NumIRInsts 14,686,805 14,686,805 0 0.0%
IRModule.NumIRValueSymbols 1,497,962 1,497,962 0 0.0%
LLVM.NumLLVMBytesOutput 478,986,010 478,985,964 -46 -0.0%
SILModule.NumSILGenFunctions 335,123 335,123 0 0.0%
SILModule.NumSILOptFunctions 452,942 452,942 0 0.0%
Sema.NumConformancesDeserialized 1,098,892 1,098,892 0 0.0%
Sema.NumConstraintScopes 7,240,006 7,240,034 28 0.0%
Sema.NumDeclsDeserialized 3,002,515 3,002,587 72 0.0%
Sema.NumDeclsValidated 548,486 548,486 0 0.0%
Sema.NumFunctionsTypechecked 172,313 172,341 28 0.02%
Sema.NumGenericSignatureBuilders 124,288 124,297 9 0.01%
Sema.NumLazyGenericEnvironments 507,947 507,274 -673 -0.13%
Sema.NumLazyGenericEnvironmentsLoaded 58,120 58,120 0 0.0%
Sema.NumLazyIterableDeclContexts 330,887 330,900 13 0.0%
Sema.NumTypesDeserialized 3,708,939 3,708,397 -542 -0.01%
Sema.NumTypesValidated 273,787 273,787 0 0.0%

@DougGregor
Copy link
Member Author

@swift-ci please test compiler performance

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test compiler performance

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@swift-ci
Copy link
Contributor

Build comment file:

Summary for master full

Unexpected test results, excluded stats for RxSwift, ChattoAdditions, ProcedureKitCloud, DatabaseKit, ReactiveSwift, ReactiveCocoa, Wordy

Regressions found (see below)

Debug-batch

debug-batch brief

Regressed (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 65,315,098 471,776,158 406,461,060 622.31% ⛔
time.swift-driver.wall 152.1s 1131.7s 979.6s 644.24% ⛔
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (0)
name old new delta delta_pct

debug-batch detailed

Regressed (69)
name old new delta delta_pct
AST.NumASTBytesAllocated 1,554,700,107 12,943,312,884 11,388,612,777 732.53% ⛔
AST.NumDecls 3,552 31,829 28,277 796.09% ⛔
AST.NumDependencies 8,505 81,158 72,653 854.24% ⛔
AST.NumImportedExternalDefinitions 82,568 750,515 667,947 808.97% ⛔
AST.NumInfixOperators 1,143 12,815 11,672 1021.17% ⛔
AST.NumLoadedModules 10,980 93,504 82,524 751.58% ⛔
AST.NumLocalTypeDecls 0 13 13 100.0% ⛔
AST.NumObjCMethods 1,395 12,269 10,874 779.5% ⛔
AST.NumPostfixOperators 0 14 14 100.0% ⛔
AST.NumPrecedenceGroups 708 6,612 5,904 833.9% ⛔
AST.NumPrefixOperators 0 60 60 100.0% ⛔
AST.NumReferencedDynamicNames 8 45 37 462.5% ⛔
AST.NumReferencedMemberNames 189,536 1,766,316 1,576,780 831.92% ⛔
AST.NumReferencedTopLevelNames 12,782 110,313 97,531 763.03% ⛔
AST.NumSourceBuffers 12,774 143,637 130,863 1024.45% ⛔
AST.NumSourceLines 153,139 1,164,919 1,011,780 660.69% ⛔
AST.NumSourceLinesPerSecond 96,066 647,180 551,114 573.68% ⛔
AST.NumTotalClangImportedEntities 268,777 2,481,150 2,212,373 823.13% ⛔
AST.NumUsedConformances 9,572 96,844 87,272 911.74% ⛔
Driver.ChildrenMaxRSS 3,928,305,664 33,349,453,824 29,421,148,160 748.95% ⛔
Driver.NumDriverJobsRun 618 6,745 6,127 991.42% ⛔
Driver.NumDriverPipePolls 5,581 84,535 78,954 1414.69% ⛔
Driver.NumDriverPipeReads 5,209 87,976 82,767 1588.92% ⛔
IRModule.NumIRAliases 3,275 24,651 21,376 652.7% ⛔
IRModule.NumIRBasicBlocks 222,717 1,663,030 1,440,313 646.7% ⛔
IRModule.NumIRFunctions 117,813 892,866 775,053 657.87% ⛔
IRModule.NumIRGlobals 131,413 1,054,556 923,143 702.47% ⛔
IRModule.NumIRInsts 2,514,643 19,486,937 16,972,294 674.94% ⛔
IRModule.NumIRNamedMetaData 2,975 33,328 30,353 1020.27% ⛔
IRModule.NumIRValueSymbols 223,732 1,690,494 1,466,762 655.59% ⛔
LLVM.NumLLVMBytesOutput 65,315,098 471,776,158 406,461,060 622.31% ⛔
Parse.NumFunctionsParsed 8,008 60,824 52,816 659.54% ⛔
SILModule.NumSILGenFunctions 93,745 809,471 715,726 763.48% ⛔
SILModule.NumSILGenGlobalVariables 709 14,666 13,957 1968.55% ⛔
SILModule.NumSILGenVtables 457 3,680 3,223 705.25% ⛔
SILModule.NumSILGenWitnessTables 2,065 17,752 15,687 759.66% ⛔
SILModule.NumSILOptFunctions 72,973 664,558 591,585 810.69% ⛔
SILModule.NumSILOptGlobalVariables 794 15,082 14,288 1799.5% ⛔
SILModule.NumSILOptVtables 778 7,070 6,292 808.74% ⛔
SILModule.NumSILOptWitnessTables 3,977 34,906 30,929 777.7% ⛔
Sema.AccessLevelRequest 121,546 887,152 765,606 629.89% ⛔
Sema.DefaultAndMaxAccessLevelRequest 3,058 21,147 18,089 591.53% ⛔
Sema.EnumRawTypeRequest 970 7,625 6,655 686.08% ⛔
Sema.ExtendedNominalRequest 173,577 1,405,221 1,231,644 709.57% ⛔
Sema.InheritedDeclsReferencedRequest 8,657,760 53,402,685 44,744,925 516.82% ⛔
Sema.InheritedTypeRequest 5,472 24,916 19,444 355.34% ⛔
Sema.IsDynamicRequest 88,822 686,186 597,364 672.54% ⛔
Sema.IsObjCRequest 81,352 618,592 537,240 660.39% ⛔
Sema.NamedLazyMemberLoadFailureCount 1,702 14,576 12,874 756.4% ⛔
Sema.NamedLazyMemberLoadSuccessCount 404,416 2,478,363 2,073,947 512.83% ⛔
Sema.NominalTypeLookupDirectCount 3,413,276 16,688,782 13,275,506 388.94% ⛔
Sema.NumConformancesDeserialized 272,393 2,350,207 2,077,814 762.8% ⛔
Sema.NumConstraintScopes 458,901 7,244,170 6,785,269 1478.59% ⛔
Sema.NumConstraintsConsideredForEdgeContraction 463,266 13,054,187 12,590,921 2717.86% ⛔
Sema.NumDeclsDeserialized 1,929,672 15,775,823 13,846,151 717.54% ⛔
Sema.NumDeclsValidated 133,592 986,814 853,222 638.68% ⛔
Sema.NumFunctionsTypechecked 52,180 435,959 383,779 735.49% ⛔
Sema.NumGenericSignatureBuilders 103,889 749,010 645,121 620.97% ⛔
Sema.NumLazyGenericEnvironments 374,386 2,944,161 2,569,775 686.4% ⛔
Sema.NumLazyGenericEnvironmentsLoaded 40,094 294,866 254,772 635.44% ⛔
Sema.NumLazyIterableDeclContexts 321,123 2,644,515 2,323,392 723.52% ⛔
Sema.NumTypesDeserialized 2,086,079 16,537,712 14,451,633 692.77% ⛔
Sema.NumTypesValidated 109,378 853,277 743,899 680.12% ⛔
Sema.NumUnloadedLazyIterableDeclContexts 213,910 1,786,969 1,573,059 735.38% ⛔
Sema.OverriddenDeclsRequest 175,978 1,416,073 1,240,095 704.69% ⛔
Sema.SetterAccessLevelRequest 8,644 52,106 43,462 502.8% ⛔
Sema.SuperclassDeclRequest 5,656,335 40,628,879 34,972,544 618.29% ⛔
Sema.SuperclassTypeRequest 2,732 14,766 12,034 440.48% ⛔
Sema.UnderlyingTypeDeclsReferencedRequest 1,517,396 2,483,460 966,064 63.67% ⛔
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (18)
name old new delta delta_pct
AST.NumLinkLibraries 0 0 0 0.0%
Driver.DriverDepCascadingDynamic 0 0 0 0.0%
Driver.DriverDepCascadingExternal 0 0 0 0.0%
Driver.DriverDepCascadingMember 0 0 0 0.0%
Driver.DriverDepCascadingNominal 0 0 0 0.0%
Driver.DriverDepCascadingTopLevel 0 0 0 0.0%
Driver.DriverDepDynamic 0 0 0 0.0%
Driver.DriverDepExternal 0 0 0 0.0%
Driver.DriverDepMember 0 0 0 0.0%
Driver.DriverDepNominal 0 0 0 0.0%
Driver.DriverDepTopLevel 0 0 0 0.0%
Driver.NumDriverJobsSkipped 0 0 0 0.0%
Driver.NumProcessFailures 0 0 0 0.0%
Frontend.NumProcessFailures 0 0 0 0.0%
IRModule.NumIRComdatSymbols 0 0 0 0.0%
IRModule.NumIRIFuncs 0 0 0 0.0%
SILModule.NumSILGenDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILOptDefaultWitnessTables 0 0 0 0.0%

Release

release brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
name old new delta delta_pct
LLVM.NumLLVMBytesOutput 458,769,360 458,769,008 -352 -0.0%
time.swift-driver.wall 2106.7s 2101.4s -5.3s -0.25%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (23)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 137,101 137,205 104 0.08%
AST.NumLoadedModules 6,178 6,178 0 0.0%
AST.NumTotalClangImportedEntities 440,555 441,105 550 0.12%
AST.NumUsedConformances 99,719 99,719 0 0.0%
IRModule.NumIRBasicBlocks 1,663,666 1,663,666 0 0.0%
IRModule.NumIRFunctions 736,273 736,273 0 0.0%
IRModule.NumIRGlobals 838,357 838,357 0 0.0%
IRModule.NumIRInsts 14,286,791 14,286,791 0 0.0%
IRModule.NumIRValueSymbols 1,426,537 1,426,537 0 0.0%
LLVM.NumLLVMBytesOutput 458,769,360 458,769,008 -352 -0.0%
SILModule.NumSILGenFunctions 316,537 316,537 0 0.0%
SILModule.NumSILOptFunctions 438,650 438,650 0 0.0%
Sema.NumConformancesDeserialized 1,076,187 1,076,187 0 0.0%
Sema.NumConstraintScopes 7,175,345 7,175,373 28 0.0%
Sema.NumDeclsDeserialized 2,904,790 2,904,862 72 0.0%
Sema.NumDeclsValidated 525,429 525,429 0 0.0%
Sema.NumFunctionsTypechecked 163,144 163,172 28 0.02%
Sema.NumGenericSignatureBuilders 120,174 120,183 9 0.01%
Sema.NumLazyGenericEnvironments 490,200 489,542 -658 -0.13%
Sema.NumLazyGenericEnvironmentsLoaded 56,833 56,833 0 0.0%
Sema.NumLazyIterableDeclContexts 319,901 319,914 13 0.0%
Sema.NumTypesDeserialized 3,600,769 3,600,554 -215 -0.01%
Sema.NumTypesValidated 266,709 266,709 0 0.0%

Within unqualified name lookup, replace uses of Type-based lookup
(formed from calls to getSelfTypeInContext()) with declaration-based
name lookup, so that name lookup doesn't depend directly on the type
checker.

The main oddity here is that we need to consider "Self: Foo"
requirements within a protocol extension during name lookup, so that
we will also look into "Foo". This is handled via the basic
name-lookup facilities that allow us to resolve TypeReprs to
declarations without going through the type checker.
This avoids a call into the lazy resolver simply to figure out which
protocols a type conforms to.
It’s no longer introduced anywhere. NFC
…equest.

Name lookup within a protocol extension also looks into protocols and
superclasses on the right-hand side of Self constraints in the where
clause, e.g., "Self: Foo". Turn that function into a request to avoid
infinite recursion on invalid code.
The property that we are checking for here isn’t really local to the
nominal type or extension declaration, and triggers semantic queries
that aren’t needed elsewhere. Remove it, because it’s not adding value.
…face types.

Fixes a diagnostics regression due to the name-shadowing changes.
There is no point in threading LazyResolver parameters through this
data structure; we can recover the resolver in the one place it is 
needed.
@DougGregor DougGregor force-pushed the unqualified-lookup-via-decls branch from 58a7c83 to e21673d Compare August 14, 2018 08:06
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor DougGregor changed the title [Name lookup] Use decl-based name lookup for unqualified lookup. [Name lookup] Use decl-based name lookup more regularly Aug 14, 2018
@DougGregor DougGregor merged commit 6384d08 into swiftlang:master Aug 14, 2018
@DougGregor DougGregor deleted the unqualified-lookup-via-decls branch August 14, 2018 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants