4a22cfe | Chris Lattner | 12 January 2016, 06:06:31 UTC | enhance diagnoseGeneralConversionFailure to handle conversions between tuple types with mismatched labels better, even if the element types cannot be resolved. | 12 January 2016, 06:20:19 UTC |
481fb4c | Doug Gregor | 12 January 2016, 05:48:30 UTC | Merge pull request #938 from milseman/suppress_warnings_api API to suppress warnings | 12 January 2016, 05:48:30 UTC |
10c8ce8 | Slava Pestov | 09 January 2016, 10:07:04 UTC | SILGen: Correctly emit accessors synthesized to witness protocol requirements We weren't adding them as external decls unless they were for storage on an imported type, which meant SILGen wasn't emitting them if the conforming type was from a different Swift source file, or in whole-module mode, a different module. This led to linker errors. Instead, always add accessors to the external decl list, but skip them in SILGen if they are contained in the DeclContext we are currently emitting (which is a source file or module). Note that they are still emitted with the wrong linkage, from a resilience perspective. Clients must only ever see public exports for getters, setters and materializeForSet emitted because they are required by resilience or the access pattern; 'accidental' accessors synthesized for protocol conformance should not be public. | 12 January 2016, 05:40:25 UTC |
80270a9 | Michael Ilseman | 12 January 2016, 05:30:18 UTC | Incorporate Doug's review suggestions | 12 January 2016, 05:30:18 UTC |
162becc | Doug Gregor | 12 January 2016, 05:07:36 UTC | Merge pull request #941 from apple/revert-244-dev Revert "Remove unnecessary 'visitDecl' default cases." | 12 January 2016, 05:07:36 UTC |
d1707c0 | Doug Gregor | 12 January 2016, 05:07:21 UTC | Revert "Remove unnecessary 'visitDecl' default cases." | 12 January 2016, 05:07:21 UTC |
bef0657 | Doug Gregor | 12 January 2016, 04:48:58 UTC | Merge pull request #244 from mohammadg/dev Remove unnecessary 'visitDecl' default cases. | 12 January 2016, 04:48:58 UTC |
8d835de | Chris Lattner | 12 January 2016, 04:47:47 UTC | My diagnostics fix fixed this test along the way. | 12 January 2016, 04:47:47 UTC |
a5a988e | Chris Lattner | 12 January 2016, 04:41:18 UTC | Fix rdar://22509125 QoI: Error when unable to infer generic archetype lacks greatness Rearrange diagnoseGeneralConversionFailure to diagnose structural problems even if we have some UnresolvedTypes floating around, then reject constraint failures with UnresolvedTypes in them even harder. This keeps us giving good errors about failures where we have a structural problem (with buried irrelevant details) while not complaining about cases that are actually ambiguous. The end result of this is that we produce a lot better error messages in the case of failed archetype inference. This also highlights the poor job we do handling multi-stmt closureexprs... | 12 January 2016, 04:45:11 UTC |
13d96b3 | Chris Lattner | 12 January 2016, 04:31:16 UTC | Spell out these diagnostics more, they are embarassing, but we should fix that not hide it. | 12 January 2016, 04:45:11 UTC |
3c5c93a | Doug Gregor | 12 January 2016, 04:42:54 UTC | Merge pull request #669 from practicalswift/perl-fixes [Perl] Use pragma to restrict unsafe constructs | 12 January 2016, 04:42:54 UTC |
f0d294b | Dmitri Gribenko | 12 January 2016, 04:41:24 UTC | Merge pull request #884 from practicalswift/apostrophes [gardening] Replace left/right quotation marks | 12 January 2016, 04:41:24 UTC |
1915b06 | Doug Gregor | 12 January 2016, 04:39:21 UTC | Merge pull request #781 from JaSpa/highlight-generic-args [Sema] Highlight angle brackets <…> in diagnostics | 12 January 2016, 04:39:21 UTC |
a9e1fc0 | Doug Gregor | 12 January 2016, 04:35:14 UTC | Merge pull request #899 from gregomni/sr-427 [SR-427][AST] Report DoesNotConform for failed substitutions in a bound generic type. | 12 January 2016, 04:35:14 UTC |
ab35b15 | Doug Gregor | 12 January 2016, 04:34:32 UTC | Merge pull request #932 from practicalswift/swiftc-28197-swift-typebase-getdesugaredtype [swiftc] Add test case for crash triggered in swift::TypeBase::getDesugaredType() | 12 January 2016, 04:34:32 UTC |
0e48b9c | Jordan Rose | 12 January 2016, 04:01:30 UTC | [docs] Note that the Lexicon file uses Sphinx-specific features. I don't like this not being viewable on GitHub, but I don't want to reformat it all to use bare definition lists and refs at the moment. | 12 January 2016, 04:01:30 UTC |
daca24f | Jordan Rose | 12 January 2016, 03:56:29 UTC | [docs] Add a "Lexicon" file that defines common Swift jargon terms. Inspired by LLVM's similar file. (Thanks for reminding me about that, Chris!) | 12 January 2016, 03:57:19 UTC |
5e1d65c | Slava Pestov | 11 January 2016, 23:14:39 UTC | SILGen: Remove some Builtins that are no longer needed These were only used by the Sema-synthesized materializeForSet. | 12 January 2016, 03:55:46 UTC |
249242b | Slava Pestov | 10 January 2016, 09:23:57 UTC | SILGen: Always open-code materializeForSet This improves MaterializeForSetEmitter to support emission of static materializeForSet thunks, as well as witnesses. This is now done by passing in a nullptr as the conformance and requirement parameters, and adding some conditional code. Along the way, I fixed a few limitations of the old code, namely weak/unowned and static stored properties weren't completely plumbed through. There was also a memory leak in addressed materializeForSet, the valueBuffer was never freed. Finally, remove the materializeForSet synthesis in Sema since it is no longer needed, which fixes at least one known crash case. | 12 January 2016, 03:53:16 UTC |
3085094 | Chris Lattner | 12 January 2016, 03:37:12 UTC | fix <rdar://problem/23942743> [QoI] Bad diagnostic when errors inside enum constructor On something like this: let x = .Tomato(cloud: .None) we previously emitted a "type of expression is ambiguous without more context" error while pointing to .None. With a previous fix, we now produce the same error pointing to the .Tomato. With this fix, we now produce: error: reference to member 'Tomato' cannot be resolved without a contextual type to really drive the problem home. | 12 January 2016, 03:37:12 UTC |
26b51bf | Chris Lattner | 12 January 2016, 03:17:08 UTC | Fix rdar://19710848 QoI: Friendlier error message for "[] as Set" This makes diagnoseGeneralConversionFailure more conservative: it now never diagnoses a failed conversion when it involves a type that has unresolved type in it. These types could not be resolved, so it is better to let ambiguity resolution handle the problem. On "[] as Set", we would previously get: error: 'Set<_>' is not convertible to 'Set<Element>' now we get: error: generic parameter 'Element' could not be inferred | 12 January 2016, 03:19:06 UTC |
1dff04e | Slava Pestov | 12 January 2016, 02:35:12 UTC | SILGen: Add a new RValue(AbstractionPattern, CanType) constructor | 12 January 2016, 02:41:29 UTC |
a6de984 | Dmitri Gribenko | 12 January 2016, 02:22:51 UTC | Merge pull request #936 from EZ-NET/correct_document_array-type-parameter-name [stdlib] [docs] Modify names of Array's type parameter and Slice in comments. | 12 January 2016, 02:22:51 UTC |
e4bf75f | Tomohiro Kumagai | 12 January 2016, 02:09:15 UTC | [stdlib] [docs] Re-wrap some paragraphs to fit within 80 characters. #936 | 12 January 2016, 02:09:15 UTC |
09149ae | Chris Lattner | 12 January 2016, 01:32:41 UTC | Fix some validation test failures introduced by b5500b8, by handling UnresolvedType in a couple places I missed. | 12 January 2016, 01:33:10 UTC |
7b5741d | Erik Eckstein | 12 January 2016, 01:10:29 UTC | SideEffectAnalysis: consider that @callee_owned calls implicitly release the context. fixes rdar://problem/24112977 | 12 January 2016, 01:32:15 UTC |
41bcdb3 | Chris Lattner | 12 January 2016, 01:14:27 UTC | add newline at end of file to silence warning. | 12 January 2016, 01:14:27 UTC |
b5500b8 | Chris Lattner | 12 January 2016, 01:02:25 UTC | Generalize the conditions in which we'll accept an ambiguous solution to a constraint system in "allowFreeTypeVariables" mode. Previously, we only allowed a few specific constraints, now we allow any relational and member constraints. The later one is a big deal because it means that we can allow ".Foo" expressions as ambiguous solutions, which CSDiags can handle well. This unblocks solving 23942743 and enables some minor improvements across the board, including diagnosing things like this better: Optional(.none) // now: generic parameter 'T' could not be inferred That said, it also just permutes some non-awesome diagnostics. | 12 January 2016, 01:04:46 UTC |
d282fd7 | Michael Ilseman | 12 January 2016, 00:48:42 UTC | Allow suppressing individual diagnostics. Extend DiagnosticState to track per-diagnostic desired behaviors, allowing users of the APIs to individually suppress diagnostics. | 12 January 2016, 00:48:42 UTC |
42591f7 | Dmitri Gribenko | 11 January 2016, 23:46:50 UTC | SourceKit CMake: use the C compiler and linker flags computed by the Swift build system | 12 January 2016, 00:23:54 UTC |
08854d1 | Dmitri Gribenko | 11 January 2016, 23:47:29 UTC | SourceKit CMake: remove code to handle legacy SDKs | 12 January 2016, 00:23:54 UTC |
cbd87f8 | Dmitri Gribenko | 11 January 2016, 23:46:21 UTC | Fix CMake coding style | 12 January 2016, 00:23:54 UTC |
1f3b314 | John McCall | 12 January 2016, 00:02:48 UTC | Distinguish conformance and superclass generic requirements. As part of this, use a different enum for parsed generic requirements. NFC except that I noticed that ASTWalker wasn't visiting the second type in a conformance constraint; fixing this seems to have no effect beyond producing better IDE annotations. | 12 January 2016, 00:07:37 UTC |
0b8468d | Dmitri Gribenko | 11 January 2016, 23:54:22 UTC | Merge pull request #940 from practicalswift/check-dir-before-rmdir [build-script] Call rmdir(build_dir) only if build_dir exists (-c option) | 11 January 2016, 23:54:22 UTC |
612196b | Dmitri Gribenko | 11 January 2016, 23:53:26 UTC | Merge pull request #939 from practicalswift/two-cases-no-longer-timing-out [swiftc] Add two crash cases (previously timeouts, now assertion failures) | 11 January 2016, 23:53:26 UTC |
5b1ebe1 | Michael Gottesman | 10 January 2016, 06:38:46 UTC | Remove the case 'Invalid' from the TermKind enum and just use an unreachable in the ValueKind -> TermKind switch instead. In all of the cases where this is being used, we already immediately perform an unreachable if we find a TermKind::Invalid. So simplify the code and move it into the conversion switch itself. | 11 January 2016, 23:44:05 UTC |
a2097e6 | practicalswift | 11 January 2016, 23:35:33 UTC | Call rmdir(build_dir) only if build_dir exists (-c option). | 11 January 2016, 23:35:33 UTC |
8d81349 | Chris Lattner | 11 January 2016, 23:10:48 UTC | fix rdar://24029542 "Postfix '.' is reserved" error message" isn't helpful This adds some heuristics so we can emit a fixit to remove extraneous whitespace after a . and diagnose the case where a member just hasn't been written yet better. This also improves handling of tok::unknown throughout the parser a bit. This is a re-commit of ff4ea54 with an update for a SourceKit test. | 11 January 2016, 23:11:20 UTC |
d32f31b | practicalswift | 11 January 2016, 23:08:29 UTC | Add two crash cases. These two cases were previously timeout cases (infinite running time) and hence not included in validation-test/compiler_crashers/ | 11 January 2016, 23:08:29 UTC |
b58522b | Adrian Prantl | 11 January 2016, 22:47:23 UTC | Debug info: Emit nested functions in the proper nested scope. rdar://problem/24102282 | 11 January 2016, 22:47:40 UTC |
6a8ab15 | Jordan Rose | 11 January 2016, 22:26:16 UTC | [Demangle] Change the demangling text for extensions. Make it clear that this is not a nested type or submodule or anything. Mangled: _TFE9ExtModuleV9DefModule1A4testfT_T_ Before: ext.ExtModule.DefModule.A.test () -> () After: (extension in ExtModule):DefModule.A.test () -> () | 11 January 2016, 22:26:16 UTC |
411e2a1 | Michael Ilseman | 11 January 2016, 21:23:26 UTC | Merge remote-tracking branch 'milseman/suppress_warnings_api' | 11 January 2016, 21:23:26 UTC |
8ccf0e4 | Xi Ge | 11 January 2016, 18:57:43 UTC | [SourceKit][DocInfo] Check an extension's relevancy before printing the type interface of a type. rdar://24133008" | 11 January 2016, 19:19:48 UTC |
e1b54fb | John McCall | 11 January 2016, 19:12:02 UTC | Rename -> emitArchetypeWitnessTableRef to clarify calls. | 11 January 2016, 19:12:02 UTC |
acc243a | Erik Eckstein | 11 January 2016, 18:43:39 UTC | Revert "fix rdar://24029542 "Postfix '.' is reserved" error message" isn't helpful" It's probably the cause for the fail of SourceKit/SyntaxMapData/syntaxmap-edit-del.swift This reverts commit ff4ea546149ae8c98bfc41dd05ed308a9dc8b6a3. | 11 January 2016, 18:43:39 UTC |
0115507 | Tomohiro Kumagai | 11 January 2016, 08:04:45 UTC | [stdlib] [docs] Modify Array's type parameter name and rename Slice to ArraySlice in comments. In swift 1.2, `Slice` has been renamed `ArraySlice`. In swift 2.0, type parameter name of `Array` is changed from `T` to `Element`. Therefore, modified the names which appear in code comments and a document. | 11 January 2016, 08:04:45 UTC |
b5d5d82 | Dmitri Gribenko | 11 January 2016, 07:19:50 UTC | Merge pull request #935 from EZ-NET/correct_document_set-type-parameter-name [stdlib] [docs] Modify Set's type parameter name in comments. | 11 January 2016, 07:19:50 UTC |
cf8a733 | Tomohiro Kumagai | 11 January 2016, 06:05:06 UTC | [stdlib] [docs] Modify Set's type parameter name in comments. In swift 2.0, type parameter name of `Set` is changed from `T` to `Element`. Therefore, modified the names which appear in code comments and a document. | 11 January 2016, 07:02:05 UTC |
31314b1 | Michael Ilseman | 11 January 2016, 05:42:51 UTC | Add ignoreAllWarnings API New API on DiagnosticEngine to disable the reporting of warnings. No tests currently, as this is not exposed upwards to any test-able level, but tests will come when this is exposed e.g. through command line arguments. | 11 January 2016, 05:42:51 UTC |
767597d | Michael Ilseman | 11 January 2016, 04:35:52 UTC | Track previous diagnostic behavior Switch from a fatal-state machine to a previous-behavior-state machine, which is more flexible in the presence of suppressible warnings. | 11 January 2016, 04:35:52 UTC |
dcb1924 | Michael Ilseman | 11 January 2016, 03:04:19 UTC | Introduce DiagnosticState to track how we should handle diagnostics Refactor DiagnosticEngine to separate out diagnostic state tracking. This allows gives us a base from which to add further refinements, e.g. warning suppression. | 11 January 2016, 03:04:19 UTC |
2187929 | Slava Pestov | 11 January 2016, 01:03:19 UTC | SILGen: Turn static collectParams() function into a method on SILGenFunction, NFC | 11 January 2016, 01:06:20 UTC |
b70e4d2 | Slava Pestov | 10 January 2016, 21:24:18 UTC | SILGen: Split off SILGenMaterializeForSet.cpp from SILGenLValue.cpp, NFC In order to fix some other issues that came up with materializeForSet and resilience, I had to bite the bullet and finish off John's code for open-coding materializeForSet emission in SILGen. This patch makes the subsequent changes easier to review. | 11 January 2016, 01:06:19 UTC |
a467674 | Slava Pestov | 10 January 2016, 02:29:07 UTC | Sema: Always emit materializeForSelf for resilient structs This gives us consistent behavior between stored and computed properties. | 11 January 2016, 01:06:19 UTC |
c3dd77a | Slava Pestov | 09 January 2016, 12:20:21 UTC | Rename ASTContext::addedExternalDecl() to addExternalDecl() and improve some comments, NFC | 11 January 2016, 01:06:19 UTC |
9bdb7d3 | Slava Pestov | 09 January 2016, 11:29:44 UTC | Clean up handling of external declarations, NFC This is the first in a series of patches that fixes some resilience-related issues with synthesized accessors and materializeForSet. Previously we maintained two lists of external declarations encountered while type checking: - ASTContext::ExternalDefinitions - TypeChecker::implicitlyDefinedFunctions The former contained the following: - Imported nominal types from Clang, so that SILGen can emit witness tables - Functions and variables with Clang decls, so that IRGen can instruct Clang to emit them - Synthesized accessors The latter contained synthesized functions for derived conformances. Since the second list was not visible outside Sema, we relied on the Clang importer to add the type that contained the declaration to the ExternalDefinitions list. In practice, we only synthesized members of enums in this manner. Because of this, SILGenModule::emitExternalDefinitions() had special logic to skip members of enums, since it would visit them when visiting the enum itself. Instead, it appears that we can remove implicitlyDefinedFunctions completely, changing usage sites to add the decl to ExternalDefinitions instead, and simplify SILGenModule::emitExternalDefinition() a bit in the process. Also, it looks like we never had Modules appear in ExternalDefinitions, so assert if those come up instead of skipping them. | 11 January 2016, 01:05:31 UTC |
ff4ea54 | Chris Lattner | 10 January 2016, 23:28:03 UTC | fix rdar://24029542 "Postfix '.' is reserved" error message" isn't helpful This adds some heuristics so we can emit a fixit to remove extraneous whitespace after a . and diagnose the case where a member just hasn't been written yet better. This also improves handling of tok::unknown throughout the parser a bit. | 10 January 2016, 23:28:03 UTC |
6e4f61c | Maxim Moiseev | 10 January 2016, 19:38:22 UTC | Merge pull request #933 from ezephir/linux-test-runtime-revert Revert "[StdLib] Extend ReflectionHashing test to pass on Linux" | 10 January 2016, 19:38:22 UTC |
b1b9b28 | Emanuel Zephir | 10 January 2016, 11:36:53 UTC | Revert "[StdLib] Extend ReflectionHashing test to pass on Linux" This test expects consistent hash code generation on any given platform. However String instance generate different values on Linux depending on which version of libicu is installed, causing environment-specific test failures. This reverts commit def419b57fbce2391eb16c4c203c4db996dc5b97. | 10 January 2016, 11:36:53 UTC |
0f66758 | practicalswift | 10 January 2016, 11:05:10 UTC | [swiftc] Add test case for crash triggered in swift::TypeBase::getDesugaredType() Stack trace: ``` 4 swift 0x0000000001019520 swift::TypeBase::getDesugaredType() + 32 9 swift 0x0000000001026b95 swift::Type::walk(swift::TypeWalker&) const + 21 10 swift 0x000000000101651f swift::Type::findIf(std::function<bool (swift::Type)> const&) const + 31 14 swift 0x0000000000e453bf swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 1279 17 swift 0x0000000000e1b266 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 20 swift 0x0000000000e61b2a swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218 21 swift 0x0000000000e8dc6c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812 22 swift 0x0000000000e0067b swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683 23 swift 0x0000000000e01780 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 112 24 swift 0x0000000000e01929 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 265 26 swift 0x0000000000e168a4 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3876 27 swift 0x000000000100544c swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, unsigned int, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2908 28 swift 0x0000000001003e5d swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2269 29 swift 0x0000000000e3ca8b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187 32 swift 0x0000000000e6617e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 34 swift 0x0000000000e67084 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 35 swift 0x0000000000e6608a swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42 36 swift 0x0000000000ef6242 swift::IterativeTypeChecker::processResolveInheritedClauseEntry(std::pair<llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>, unsigned int>, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 146 37 swift 0x0000000000ef54cd swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 493 38 swift 0x0000000000e127b9 swift::TypeChecker::resolveInheritanceClause(llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>) + 137 39 swift 0x0000000000e15d91 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1041 44 swift 0x0000000000e1b266 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 45 swift 0x0000000000de7482 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1474 46 swift 0x0000000000c9eed2 swift::CompilerInstance::performSema() + 2946 48 swift 0x0000000000764692 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2482 49 swift 0x000000000075f271 main + 2705 Stack dump: 0. Program arguments: /path/to/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28197-swift-typebase-getdesugaredtype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28197-swift-typebase-getdesugaredtype-7a0037.o 1. While type-checking 'a' at validation-test/compiler_crashers/28197-swift-typebase-getdesugaredtype.swift:7:1 2. While resolving type d at [validation-test/compiler_crashers/28197-swift-typebase-getdesugaredtype.swift:7:32 - line:7:32] RangeText="d" 3. While type-checking expression at [validation-test/compiler_crashers/28197-swift-typebase-getdesugaredtype.swift:7:46 - line:7:55] RangeText="{class b:P" 4. While type-checking 'b' at validation-test/compiler_crashers/28197-swift-typebase-getdesugaredtype.swift:7:47 <unknown>:0: error: unable to execute command: Segmentation fault <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` | 10 January 2016, 11:05:10 UTC |
cbb95a2 | Slava Pestov | 10 January 2016, 07:30:06 UTC | Merge pull request #926 from jtbandes/innermost-params [AST] Fix inconsistent handling of generic args & params during BoundGenericType::getSubstitutions | 10 January 2016, 07:30:06 UTC |
8b57337 | Slava Pestov | 10 January 2016, 07:27:41 UTC | Merge pull request #910 from jtbandes/invalid-proto [Sema] Improve handling of invalid protocols during conformance checking | 10 January 2016, 07:27:41 UTC |
3075392 | Nadav Rotem | 10 January 2016, 03:01:30 UTC | [Compression] Accelerate the code that decodes chars from var-length streams. This change accelerates the code that decodes characters from bitstreams (represented using APInts) that are encoded using variable length encoding. The idea is simple: Extract the lowest 64 bit and decode as many characters as possible before changing the bignum. Decoding words from a local variable is much faster than changing big nums. This commit makes decompression twice as fast as compression. | 10 January 2016, 07:12:52 UTC |
2d7f6e7 | Nadav Rotem | 09 January 2016, 23:31:07 UTC | [Compression] Precompute the mapping of char-to-index using a lookup table. This change accelerates the decompression of strings a bit. | 10 January 2016, 07:12:52 UTC |
da5a0da | Nadav Rotem | 09 January 2016, 23:20:43 UTC | [Compression] Update the auto-generated header files. This commit updates the auto-generated header files using the latest version of the table generation tools in /utils/name-compression. I am updating the header files now because I am about to change the interface of some of the methods. | 10 January 2016, 07:12:52 UTC |
c6a4375 | gregomni | 06 January 2016, 21:02:36 UTC | [SR-427][AST] Report DoesNotConform for failed substitutions in a bound generic type. If a BoundGenericType is unable to get a substitution for an archetype it uses ErrorType as the replacement (Module.cpp:705). In such a case we should report DoesNotConform in lookupConformance(), which ends up generating reasonable error messages. Prior to this change the conformance would succeed and then IRGen would crash on emitting an ErrorType during emitForeignTypeMetadataRef(). Also added test that tickles crash near the same place as SR-427. | 10 January 2016, 06:40:01 UTC |
bb2a590 | Andrew Trick | 10 January 2016, 06:06:33 UTC | Improve an Optional casting unit test. Just test the cast, don't rely on the implementation of printing. | 10 January 2016, 06:39:52 UTC |
ddd236f | Chris Lattner | 10 January 2016, 05:23:28 UTC | remove the sema logic supporting closures with API names, now that they aren't possible, NFC. | 10 January 2016, 05:23:28 UTC |
a20fa87 | Chris Lattner | 10 January 2016, 05:18:50 UTC | Fix a bug that I noticed when doing the parameter rework, where we'd accidentally accept closure arguments with API names (but only in a parenthesized parameter list). While it could theoretically be interesting to support API names on closures, this is never something we intended to support, and a lot of implementation work would be necessary to make them correct. Just correctly reject them even if parenthesized. | 10 January 2016, 05:20:13 UTC |
6da11ce | Michael Gottesman | 10 January 2016, 05:10:42 UTC | Make sure that even in the standalone build configuration, we can build doxygen documentation. The issue is that this was originally done when in-tree builds were the preferred way of building so LLVM_ENABLE_DOXYGEN would be defined and LLVM would have found doxygen as well. When one is doing the current preferred standalone install, the option LLVM_ENABLE_DOXYGEN is not discoverable to the user via an option with a default argument and the doxygen package is never searched for. This commit ensures that when building standalone: 1. LLVM_ENABLE_DOXYGEN is defined as an option with a default value of FALSE. 2. The cmake dtrace package is searched for and found. When we are building standalone, we take these values from LLVM. | 10 January 2016, 05:10:45 UTC |
2f4bec9 | Chris Lattner | 10 January 2016, 04:35:48 UTC | subsume the "startsWithGreater" logic into skipUntilGreaterInTypeList, and make sure skipUntilGreaterInTypeList return a valid location even in the case of parse errors. This ensures that we form a valid source range. Also, improve parseExprIdentifier() to handle the case when skipUntilGreaterInTypeList returns an empty archetype argument list. This fixes a couple of compiler crashers. | 10 January 2016, 04:36:05 UTC |
f796899 | Chris Lattner | 10 January 2016, 04:34:11 UTC | subsume the "startsWithGreater" logic into skipUntilGreaterInTypeList, and make sure skipUntilGreaterInTypeList return a valid location even in the case of parse errors. This ensures that we form a valid source range. Also, improve parseExprIdentifier() to handle the case when skipUntilGreaterInTypeList returns an empty archetype argument list. This fixes a couple of compiler crashers. | 10 January 2016, 04:36:05 UTC |
926adfe | Chris Lattner | 10 January 2016, 04:19:39 UTC | Merge pull request #925 from jtbandes/lvalue-errortype [Sema] Skip ErrorTypes in potential bindings during constraint solving | 10 January 2016, 04:19:39 UTC |
d9b2fe6 | Chris Lattner | 10 January 2016, 04:17:56 UTC | fix a compiler crash in error recovery that @practicalswift just reported. | 10 January 2016, 04:17:56 UTC |
0fbbf59 | Chris Lattner | 10 January 2016, 04:13:05 UTC | Merge pull request #927 from practicalswift/swiftc-28196-swift-constraints-constraintgraph-addconstraint [swiftc] Add test case for crash triggered in swift::constraints::ConstraintGraph::addConstraint(…) | 10 January 2016, 04:13:05 UTC |
b8a8f96 | Chris Lattner | 10 January 2016, 04:08:07 UTC | Use isa<> instead of dyn_cast<> in a boolean context. NFC. | 10 January 2016, 04:08:23 UTC |
b632155 | Chris Lattner | 10 January 2016, 00:42:34 UTC | enhance Constraint::dump to force "DebugConstraintSolver" mode, so that type variables are printed as $T0 instead of _. NFC. | 10 January 2016, 04:08:23 UTC |
f1be251 | Dmitri Gribenko | 10 January 2016, 00:08:37 UTC | Merge pull request #930 from dcci/define [stdlib] Add missing defines for FreeBSD. | 10 January 2016, 00:08:37 UTC |
4fa7505 | Davide Italiano | 10 January 2016, 00:07:47 UTC | [stdlib] Add missing defines for FreeBSD. This makes RaceTest and StdlibCoreExtras working there. | 10 January 2016, 00:07:47 UTC |
11fda96 | Chris Lattner | 09 January 2016, 19:37:05 UTC | When we detect a property/subscript that has a setter without a getter, create a dummy getter to avoid breaking downstream invariants. This fixes three crashers, including one added by @practicalswift yesterday. | 09 January 2016, 19:38:08 UTC |
9b5fa79 | Chris Lattner | 09 January 2016, 19:18:58 UTC | Merge pull request #924 from jtbandes/fix-curriedself [Sema] Fix crash in addCurriedSelfType | 09 January 2016, 19:18:58 UTC |
89e9400 | Chris Lattner | 09 January 2016, 17:46:52 UTC | add newline to end of file, NFC | 09 January 2016, 17:47:09 UTC |
e6a8051 | Chris Lattner | 09 January 2016, 17:46:24 UTC | Merge pull request #928 from practicalswift/remove-word-processor-artefacts [gardening] Use hyphen ("-") instead of en-dash ("–") to join words in a compound construction | 09 January 2016, 17:46:24 UTC |
35448a1 | Greg Parker | 09 January 2016, 16:40:45 UTC | Merge pull request #861 from jder/fix-fail-cast-overrelease [SR-392][Runtime] Avoid overrelease when failing cast to protocol | 09 January 2016, 16:40:45 UTC |
5ac92dd | practicalswift | 09 January 2016, 16:34:44 UTC | Use hyphen instead of em-dash/en-dash. | 09 January 2016, 16:34:44 UTC |
6eb7656 | practicalswift | 09 January 2016, 11:31:46 UTC | [swiftc] Add test case for crash triggered in swift::constraints::ConstraintGraph::addConstraint(swift::constraints::Constraint*) Stack trace: ``` swift: /path/to/swift/lib/Sema/ConstraintGraph.cpp:50: std::pair<ConstraintGraphNode &, unsigned int> swift::constraints::ConstraintGraph::lookupNode(swift::TypeVariableType *): Assertion `impl.getGraphIndex() < TypeVariables.size() && "Out-of-bounds index"' failed. 9 swift 0x0000000000f068df swift::constraints::ConstraintGraph::addConstraint(swift::constraints::Constraint*) + 111 10 swift 0x0000000000e81f42 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::Constraint*, bool, bool) + 258 11 swift 0x0000000000e02ca3 swift::TypeChecker::typesSatisfyConstraint(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::DeclContext*) + 131 12 swift 0x0000000000ea8f97 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 919 13 swift 0x0000000000ead51e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4046 14 swift 0x0000000000dfa275 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 661 15 swift 0x0000000000e00609 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569 18 swift 0x0000000000ea8c68 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 104 19 swift 0x0000000000ead51e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4046 20 swift 0x0000000000dfa275 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 661 21 swift 0x0000000000e00609 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569 25 swift 0x0000000000ea8c68 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 104 26 swift 0x0000000000ead51e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4046 27 swift 0x0000000000dfa275 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 661 28 swift 0x0000000000e00609 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569 31 swift 0x0000000000e6084a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 362 32 swift 0x0000000000e6069e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 33 swift 0x0000000000e61268 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136 35 swift 0x0000000000de75ab swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1771 36 swift 0x0000000000c9eed2 swift::CompilerInstance::performSema() + 2946 38 swift 0x0000000000764692 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2482 39 swift 0x000000000075f271 main + 2705 Stack dump: 0. Program arguments: /path/to/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28196-swift-constraints-constraintgraph-addconstraint.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28196-swift-constraints-constraintgraph-addconstraint-42f46f.o 1. While type-checking 'b' at validation-test/compiler_crashers/28196-swift-constraints-constraintgraph-addconstraint.swift:12:1 2. While type-checking expression at [validation-test/compiler_crashers/28196-swift-constraints-constraintgraph-addconstraint.swift:12:8 - line:12:11] RangeText="{}{a" 3. While type-checking expression at [validation-test/compiler_crashers/28196-swift-constraints-constraintgraph-addconstraint.swift:12:10 - line:12:11] RangeText="{a" 4. While type-checking expression at [validation-test/compiler_crashers/28196-swift-constraints-constraintgraph-addconstraint.swift:12:10 - line:12:11] RangeText="{a" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` | 09 January 2016, 11:31:46 UTC |
c9f4dc0 | Greg Parker | 09 January 2016, 11:25:43 UTC | [test] Fail if a test file uses StdlibUnittest but runs no tests. This catches accidental omission of runAllTests(). Previously such test files would silently test nothing and succeed. | 09 January 2016, 11:27:56 UTC |
1e5ae16 | Greg Parker | 09 January 2016, 11:20:11 UTC | [test] Camouflage "XFAIL:" output checks so lit doesn't interpret them. | 09 January 2016, 11:27:56 UTC |
e5bd44a | Greg Parker | 09 January 2016, 11:05:33 UTC | [test] Fix two tests that were missing runAllTests(). | 09 January 2016, 11:27:56 UTC |
302632b | Dmitri Gribenko | 09 January 2016, 10:40:46 UTC | Merge pull request #919 from practicalswift/swiftc-28195-swift-constraints-constraintsystem-resolveoverload [swiftc] Add test case for crash triggered in swift::constraints::ConstraintSystem::resolveOverload(…) | 09 January 2016, 10:40:46 UTC |
b97cb48 | Jacob Bandes-Storch | 09 January 2016, 09:08:24 UTC | [AST] Fix inconsistent handling of generic args & params during BoundGenericType::getSubstitutions A decl’s full GenericSignature is set during validateGenericTypeSignature(). Then during ConstraintSystem::openTypes(), in ReplaceDependentTypes, the GenericArgs list is built from the generic signature (via getGenericParamTypes()) and passed into a new BoundGenericType. In BoundGenericType::getSubstitutions(), the GenericArgs are assumed to match getGenericParamsOfContext()->getParams(). However, in reality, the GenericArgs include all levels of generic args, whereas getGenericParamsOfContext() are the params of the innermost context only, so the params array is accessed past its end. This commit changes NominalTypeDecl::getGenericParamTypes() to return the innermost params, in order to match the output of BoundGenericType::getGenericArgs(). For clarity and to hopefully prevent future confusion, we also rename getGenericParamTypes() to getInnermostGenericParamTypes(). | 09 January 2016, 10:19:28 UTC |
7acc6ea | Greg Parker | 08 January 2016, 10:35:54 UTC | [stdlib] Fix a backwards NDEBUG check. This was inadvertently broken in d15c24e2. | 09 January 2016, 09:00:31 UTC |
8ee8adb | Greg Parker | 08 January 2016, 10:16:28 UTC | [stdlib] Move protocol conformance checking and caching into its own file. | 09 January 2016, 09:00:31 UTC |
675ca03 | Chris Lattner | 09 January 2016, 07:02:55 UTC | fix a compiler crasher that practicalswift recently found. | 09 January 2016, 07:03:18 UTC |
e21b71a | John McCall | 09 January 2016, 06:49:03 UTC | This test has been fixed. | 09 January 2016, 06:49:03 UTC |
ce2f5d6 | Jacob Bandes-Storch | 09 January 2016, 06:45:52 UTC | [Sema] Skip ErrorTypes in potential bindings during constraint solving | 09 January 2016, 06:45:52 UTC |
5fe5fa4 | John McCall | 09 January 2016, 06:07:08 UTC | Handle indirect conformance when devirtualizing existentials. While I'm in this code, generalize it to propagate the original type information in more cases, including when the original type is still dependent, and teach it to handle existential metatypes. rdar://24114020 | 09 January 2016, 06:33:45 UTC |
824c1c0 | Jacob Bandes-Storch | 09 January 2016, 06:08:11 UTC | [Sema] Fix crash in addCurriedSelfType isGenericContext() returning true doesn’t necessarily imply that getGenericSignature() returns non-null. getGenericSignatureOfContext() performs a traversal equivalent to isGenericContext(), so we use it instead. | 09 January 2016, 06:08:46 UTC |
33ed1e0 | Slava Pestov | 09 January 2016, 03:51:55 UTC | IRGen: Add ResilienceExpansion parameter to TypeInfo::isKnownEmpty(), NFC In a few places, we have to be careful about the distinction between "empty in this resilience domain" versus "empty in all resilience domains". Make callers think about this by adding a parameter instead of relying on them to check isFixedSize() as necessary first. While making this change I noticed that the code for checking if types are empty when computing extra inhabitants of structs and enums might be slightly wrong in the face of resilience; I will revisit this later. | 09 January 2016, 03:56:01 UTC |
627c906 | Slava Pestov | 08 January 2016, 22:12:57 UTC | SILGen: Emit alloc_global when initializing global variables It is still not clear to me when we access global variables from other modules directly, versus using accessors; it seems to be controlled by the -sil-serialize-all flag, rather than any language feature. Until/if we add a @_fixed_layout equivalent for globals, I can't really test direct access of globals from other modules; when we figure out the story here I'll be able to add more tests and also tighten up some isResilient() checks in the global code, but what's in there now seems to work. | 09 January 2016, 03:56:00 UTC |