Skip to content

[Type checker] Move TypeChecker::resolveType() into TypeResolution. #18868

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 7 commits into from
Aug 21, 2018

Conversation

DougGregor
Copy link
Member

Separate type resolution almost completely from the TypeChecker instance, and move the primary entry point (TypeChecker::resolveType()) into TypeResolution.

…ypeResolver

Do the easy part of separating the TypeResolver, which is chiefly responsible
for turning TypeReprs into Types, from the TypeChecker.
…hecker.

They’re still static methods for convenience, but they don’t depend on
the type checker’s state.
…nce.

Use the usual bag of tricks to eliminating dependence on the
TypeChecker instance: static functions, LazyResolver callbacks, and
emitting diagnostics on decls/ASTContext.
Now that type resolution is (almost completely) separated from the type
checker instance, move resolveType() out to TypeResolution where it
belongs.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test compiler performance

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test compiler performance

@swift-ci
Copy link
Contributor

Build comment file:

Summary for master smoketest

Unexpected test results, excluded stats for Kingfisher, ReactiveCocoa

Regressions found (see below)

Debug

debug brief

Regressed (1)
name old new delta delta_pct
time.swift-driver.wall 19.6s 20.1s 462.9ms 2.36% ⛔
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
name old new delta delta_pct
Frontend.NumInstructionsExecuted 162,682,545,559 162,672,936,837 -9,608,722 -0.01%
LLVM.NumLLVMBytesOutput 9,385,772 9,385,772 0 0.0%

debug detailed

Regressed (0)
name old new delta delta_pct
Improved (1)
name old new delta delta_pct
Sema.NumTypesValidated 30,254 21,416 -8,838 -29.21% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (22)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 5,982 5,982 0 0.0%
AST.NumLoadedModules 1,281 1,281 0 0.0%
AST.NumTotalClangImportedEntities 18,238 18,238 0 0.0%
AST.NumUsedConformances 1,344 1,344 0 0.0%
IRModule.NumIRBasicBlocks 30,973 30,973 0 0.0%
IRModule.NumIRFunctions 17,122 17,122 0 0.0%
IRModule.NumIRGlobals 14,036 14,036 0 0.0%
IRModule.NumIRInsts 437,623 437,623 0 0.0%
IRModule.NumIRValueSymbols 29,349 29,349 0 0.0%
LLVM.NumLLVMBytesOutput 9,385,772 9,385,772 0 0.0%
SILModule.NumSILGenFunctions 8,060 8,060 0 0.0%
SILModule.NumSILOptFunctions 11,016 11,016 0 0.0%
Sema.NumConformancesDeserialized 31,056 31,056 0 0.0%
Sema.NumConstraintScopes 75,123 75,123 0 0.0%
Sema.NumDeclsDeserialized 259,926 259,926 0 0.0%
Sema.NumDeclsValidated 18,551 18,483 -68 -0.37%
Sema.NumFunctionsTypechecked 5,036 5,036 0 0.0%
Sema.NumGenericSignatureBuilders 11,007 11,009 2 0.02%
Sema.NumLazyGenericEnvironments 50,018 50,018 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 5,934 5,934 0 0.0%
Sema.NumLazyIterableDeclContexts 40,541 40,541 0 0.0%
Sema.NumTypesDeserialized 113,219 113,219 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) (3)
name old new delta delta_pct
Frontend.NumInstructionsExecuted 217,350,718,694 217,373,966,750 23,248,056 0.01%
LLVM.NumLLVMBytesOutput 10,500,068 10,500,068 0 0.0%
time.swift-driver.wall 34.6s 34.4s -137.3ms -0.4%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (1)
name old new delta delta_pct
Sema.NumTypesValidated 16,700 11,116 -5,584 -33.44% ✅
Unchanged (delta < 1.0% or delta < 100.0ms) (22)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 1,411 1,411 0 0.0%
AST.NumLoadedModules 100 100 0 0.0%
AST.NumTotalClangImportedEntities 4,911 4,911 0 0.0%
AST.NumUsedConformances 1,346 1,346 0 0.0%
IRModule.NumIRBasicBlocks 34,094 34,094 0 0.0%
IRModule.NumIRFunctions 15,290 15,290 0 0.0%
IRModule.NumIRGlobals 13,532 13,532 0 0.0%
IRModule.NumIRInsts 332,336 332,336 0 0.0%
IRModule.NumIRValueSymbols 27,315 27,315 0 0.0%
LLVM.NumLLVMBytesOutput 10,500,068 10,500,068 0 0.0%
SILModule.NumSILGenFunctions 6,207 6,207 0 0.0%
SILModule.NumSILOptFunctions 9,285 9,285 0 0.0%
Sema.NumConformancesDeserialized 16,278 16,278 0 0.0%
Sema.NumConstraintScopes 73,691 73,691 0 0.0%
Sema.NumDeclsDeserialized 53,697 53,697 0 0.0%
Sema.NumDeclsValidated 12,645 12,645 0 0.0%
Sema.NumFunctionsTypechecked 3,079 3,079 0 0.0%
Sema.NumGenericSignatureBuilders 2,588 2,588 0 0.0%
Sema.NumLazyGenericEnvironments 9,496 9,496 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 1,344 1,344 0 0.0%
Sema.NumLazyIterableDeclContexts 5,829 5,829 0 0.0%
Sema.NumTypesDeserialized 30,574 30,574 0 0.0%

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