Skip to content

Diagnose typealiases of non-public types in inlinable functions #23912

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

Conversation

jrose-apple
Copy link
Contributor

...as a warning, since we didn't check this correctly in Swift 5. For parseable interfaces, these typealiases won't work at all.

...as a warning, since we didn't check this correctly in Swift 5.
For parseable interfaces, these typealiases won't work at all.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test compiler performance

@@ -176,6 +177,11 @@ bool TypeChecker::diagnoseInlinableDeclRefAccess(SourceLoc loc,
diagName = accessor->getStorage()->getFullName();
}

// Swift 5.0 did not check the underlying types of local typealiases.
// FIXME: Conditionalize this once we have a new language mode.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still worried about these. This is the second one I'm adding. Should we be using isSwiftVersionAtLeast(9999) in the mean time?

Copy link
Contributor

@harlanhaskins harlanhaskins left a comment

Choose a reason for hiding this comment

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

Good catch!

@swift-ci
Copy link
Contributor

Summary for master smoketest

Unexpected test results, excluded stats for ReactiveCocoa

No regressions above thresholds

Debug

debug 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 108,782,162,534 108,449,235,535 -332,926,999 -0.31%
LLVM.NumLLVMBytesOutput 6,150,708 6,150,780 72 0.0%
time.swift-driver.wall 14.5s 14.4s -112.4ms -0.78%

debug 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 1,110 1,110 0 0.0%
AST.NumLoadedModules 1,038 1,038 0 0.0%
AST.NumTotalClangImportedEntities 4,462 4,462 0 0.0%
AST.NumUsedConformances 886 886 0 0.0%
IRModule.NumIRBasicBlocks 18,032 18,032 0 0.0%
IRModule.NumIRFunctions 10,542 10,542 0 0.0%
IRModule.NumIRGlobals 8,013 8,013 0 0.0%
IRModule.NumIRInsts 313,099 313,099 0 0.0%
IRModule.NumIRValueSymbols 17,618 17,618 0 0.0%
LLVM.NumLLVMBytesOutput 6,150,708 6,150,780 72 0.0%
SILModule.NumSILGenFunctions 5,370 5,370 0 0.0%
SILModule.NumSILOptFunctions 7,036 7,036 0 0.0%
Sema.NumConformancesDeserialized 17,297 17,297 0 0.0%
Sema.NumConstraintScopes 40,586 40,586 0 0.0%
Sema.NumDeclsDeserialized 147,113 147,113 0 0.0%
Sema.NumDeclsValidated 11,580 11,580 0 0.0%
Sema.NumFunctionsTypechecked 2,540 2,540 0 0.0%
Sema.NumGenericSignatureBuilders 5,030 5,030 0 0.0%
Sema.NumLazyGenericEnvironments 33,142 33,142 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 2,036 2,036 0 0.0%
Sema.NumLazyIterableDeclContexts 27,050 27,050 0 0.0%
Sema.NumTypesDeserialized 66,836 66,836 0 0.0%
Sema.NumTypesValidated 12,154 12,154 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 142,593,642,218 142,618,902,179 25,259,961 0.02%
LLVM.NumLLVMBytesOutput 7,168,296 7,168,364 68 0.0%
time.swift-driver.wall 26.2s 26.2s -69.2ms -0.26%

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 402 402 0 0.0%
AST.NumLoadedModules 76 76 0 0.0%
AST.NumTotalClangImportedEntities 2,146 2,146 0 0.0%
AST.NumUsedConformances 890 890 0 0.0%
IRModule.NumIRBasicBlocks 21,170 21,170 0 0.0%
IRModule.NumIRFunctions 10,034 10,034 0 0.0%
IRModule.NumIRGlobals 8,107 8,107 0 0.0%
IRModule.NumIRInsts 224,230 224,230 0 0.0%
IRModule.NumIRValueSymbols 17,289 17,289 0 0.0%
LLVM.NumLLVMBytesOutput 7,168,296 7,168,364 68 0.0%
SILModule.NumSILGenFunctions 4,176 4,176 0 0.0%
SILModule.NumSILOptFunctions 5,848 5,848 0 0.0%
Sema.NumConformancesDeserialized 12,457 12,457 0 0.0%
Sema.NumConstraintScopes 39,382 39,382 0 0.0%
Sema.NumDeclsDeserialized 32,453 32,453 0 0.0%
Sema.NumDeclsValidated 7,874 7,874 0 0.0%
Sema.NumFunctionsTypechecked 2,204 2,204 0 0.0%
Sema.NumGenericSignatureBuilders 1,718 1,718 0 0.0%
Sema.NumLazyGenericEnvironments 6,869 6,869 0 0.0%
Sema.NumLazyGenericEnvironmentsLoaded 130 130 0 0.0%
Sema.NumLazyIterableDeclContexts 4,265 4,265 0 0.0%
Sema.NumTypesDeserialized 18,138 18,138 0 0.0%
Sema.NumTypesValidated 6,942 6,942 0 0.0%

@jrose-apple
Copy link
Contributor Author

Debug source compat failure is on a machine that looks like it ran out of disk space; given the success of the release one I'm going to merge.

@jrose-apple jrose-apple merged commit a15dec8 into swiftlang:master Apr 10, 2019
@jrose-apple jrose-apple deleted the do-we-call-them-type-bookmarks-now branch April 10, 2019 16:29
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Apr 10, 2019
…tlang#23912)

...as a warning, since we didn't check this correctly in Swift 5.
For parseable interfaces, these typealiases won't work at all.

(cherry picked from commit a15dec8)
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