-
Notifications
You must be signed in to change notification settings - Fork 10.5k
ABI FIXME#16,17: Hoist += operator out of the array types into RangeReplaceableCollection #5170
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
ABI FIXME#16,17: Hoist += operator out of the array types into RangeReplaceableCollection #5170
Conversation
@swift-ci Please smoke test |
Looks like this change is making |
Yeah looking at that now. |
I would guess that making it |
When building on a macOS host, and when `SWIFT_INCLUDE_TESTS` is specified, the `swiftSwiftReflectionTest` target is added to all platforms. However, this target has a dependency upon Foundation, which is not available on non-Apple platforms. Use `add_swift_library`'s `TARGET_SDKS` parameter and other gating logic to ensure the target is only added for platforms that actually have Darwin available.
This approach side steps the whole dependency issue between the lipo target and the codesign target by just combining them (if needed). This is accomplished by moving the codesign code into `_add_swift_lipo_target` and having it conditional on passing `CODESIGN` as an option. This patch also updates `_add_swift_lipo_target` to use named arguments instead of positional ones, and provides a little bit of cleanup. There is more opportunity for larger refactoring and cleanup here by not generating a lipo target at all on non-darwin platforms.
This code was added in the mega-commit 6670bb7 with the commit message "Rewrite the CMake build system", so I'm a little bit light on context here. The comment in the code was: # Construct a unique name for the custom target. # Use a hash so that the file name does not push the OS limits for filename # length. This seems bunk to me. Since the string being hashed is a filename it seems to me that we don't need a hash to stay under the OS filename size limits. Additionally since output files must be unique using the filename as the unique target name seems like a good idea to me. The only issue here is that custom target names can't contain '/'s. To workaround that we replace the '/' character with '-'. This patch has the added benefit of having the full filename encoded into the target names, so if you need to debug the build dependency graph you can much more easily walk back from the generated build files to the place in CMake where it was generated.
…nce methods We strip the first input type on instance methods like, struct S { func foo(T) -> U } // (S)->(T)->U but we should not do that when it's actually a curried instance method, such as S.foo.
... instead of ManagedBufferPointer. This is what we already did for Array, Set and Dictionary. The intention is to simplify the generated SIL which is generated for ManagedBuffer operations.
Yeah it does. But in fact shouldn't the protocol requirement for |
On Darwin, LLVM builds with -gmodules which causes debug info for the types defined by the LLVM modules is stored alongside the modules in the module cache. Deleting the module cache on every re-invocation of build-script without re-building the LLVM and clang modules will erase the debug info and thus render any LLVM types undebuggable. rdar://problem/28655564
@swift-ci Please smoke test |
I think you're right. Since |
[code-completion] Fix type-relation check on implicitly curried instance methods
@swift-ci Please smoke test |
Build failed |
OK. I see what you mean now. Removing |
Build failed |
Use a SmallVector for scratch space to use to build the ArrayRefs instead.
Oh I see, as in there shouldn't be a Is that compatible with having two different versions of I can see it being preferable having it still be a method, to go along with So yeah, needs an evolution proposal (probably did just for moving them up from |
Right now there is no difference in the implementation of I don't think evolution proposal is required for the change you've made, as it simply moves the method from a concrete type to a protocol, which is additive. Solving the problem or protocol requirement (whether it should be an operator or a method) is not part of this change, so I still think adding (or rather keeping) a FIXME would be nice. |
Ah so in fact the two implementations of |
[CMake] Fix codesign dependency (take 2)
[CMake] Don't use hashes in target names
stdlib: Use new built-ins for tail-allocated arrays in ManagedBuffer
[Parse] Improve error handling in parseList
…ookupConformance(swift::Type, swift::ProtocolDecl*, swift::LazyResolver*) Stack trace: ``` found code completion token A at offset 137 swift-ide-test: /path/to/swift/lib/AST/Module.cpp:596: ArrayRef<swift::Substitution> swift::TypeBase::gatherAllSubstitutions(Module *, swift::LazyResolver *, swift::DeclContext *): Assertion `boundGeneric->getGenericArgs().size() == genericSig->getInnermostGenericParams().size()' failed. 8 swift-ide-test 0x0000000000cad47d swift::ModuleDecl::lookupConformance(swift::Type, swift::ProtocolDecl*, swift::LazyResolver*) + 1677 9 swift-ide-test 0x0000000000a706ce swift::TypeChecker::conformsToProtocol(swift::Type, swift::ProtocolDecl*, swift::DeclContext*, swift::OptionSet<swift::ConformanceCheckFlags, unsigned int>, swift::ProtocolConformance**, swift::SourceLoc) + 62 10 swift-ide-test 0x0000000000a9e689 swift::TypeChecker::resolveTypeInContext(swift::TypeDecl*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 1273 14 swift-ide-test 0x0000000000a9fdfd swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 157 16 swift-ide-test 0x0000000000aa0e0f swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 159 17 swift-ide-test 0x0000000000a9f5a5 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 277 18 swift-ide-test 0x0000000000a1ff62 swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 2178 19 swift-ide-test 0x0000000000a62cd6 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, swift::GenericEnvironment*, swift::GenericTypeResolver*) + 326 20 swift-ide-test 0x0000000000a640c4 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, bool, std::function<void (swift::ArchetypeBuilder&)>) + 116 21 swift-ide-test 0x0000000000a64b10 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 128 22 swift-ide-test 0x0000000000a21bac swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 348 27 swift-ide-test 0x0000000000a28126 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 28 swift-ide-test 0x0000000000a4e64f swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1055 29 swift-ide-test 0x0000000000838ef6 swift::CompilerInstance::performSema() + 3350 30 swift-ide-test 0x00000000007d9854 main + 42916 Stack dump: 0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE> 1. While type-checking 'c' at <INPUT-FILE>:3:1 2. While resolving type T at [<INPUT-FILE>:3:25 - line:3:25] RangeText="T" ```
…wift-moduledecl-lookupconformance
Fixed an assert caused when a TupleExpr that didn't have a valid SourceRange had a valid SourceLoc for the first element but not for the last
…Names. 'processInfo' was removed entirely because it's now considered a class property, and we don't ever import those as initializers.
…typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) Stack trace: ``` found code completion token A at offset 141 swift-ide-test: /path/to/swift/lib/Sema/TypeCheckStmt.cpp:1277: bool swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl *, swift::SourceLoc): Assertion `BS && "Should have a body"' failed. 8 swift-ide-test 0x0000000000a98477 swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 39 9 swift-ide-test 0x0000000000a50491 swift::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 657 13 swift-ide-test 0x0000000000c5d4d4 swift::Decl::walk(swift::ASTWalker&) + 20 14 swift-ide-test 0x0000000000cb22ee swift::SourceFile::walk(swift::ASTWalker&) + 174 15 swift-ide-test 0x0000000000cb15ff swift::ModuleDecl::walk(swift::ASTWalker&) + 95 16 swift-ide-test 0x0000000000c87fc4 swift::DeclContext::walkContext(swift::ASTWalker&) + 180 17 swift-ide-test 0x0000000000989aa8 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 136 18 swift-ide-test 0x0000000000839051 swift::CompilerInstance::performSema() + 3697 19 swift-ide-test 0x00000000007d9854 main + 42916 Stack dump: 0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE> 1. While walking into decl getter for a at <INPUT-FILE>:3:5 ```
[APINotes] Replace old FactoryAsInit annotation with equivalent SwiftNames.
…wift-typechecker-typecheckabstractfunctionbodyuntil
…ructions, just put the name in SILNodes.def and use metaprogramming. This is a cleanup for SILParsing/Printing. I verified that everything was spelled correctly by taking the current parsing switch moving that into a file, regenerating it using the .def file and then diffed them. The diff was the same. rdar://28685236
SR-1255: Improve diagnostic when one of the parameters marked as autoclosure
Always check arguments of the tuple type against corresponding parameters, otherwise for a single argument functions e.g. foo(_ a: Any) after SE-0046 type checker is going to produce incorrect solution.
SR-2505: Fix "Call arguments did not match up" assertion
…ing_parsing_instead_of_hardcoding_names [sil] Rather than maintaining manually the textual opcode for SILInst…
Initialize CachedVFile with nullptr
…KNodes. (swiftlang#5297) During the lifetime of analysing source-breaking changes, we may compare the equality of two SDKNodes more than once, which makes the comprison results amenable for caching. This patch implemented it. NFC
…edswift/swift into range-replaceable-append-operator
This was blocked on a compiler crash that is since fixed (rdar://problem/16566712).
May have performance impact so just putting it here to test/review for now.