Commit Graph

80891 Commits

Author SHA1 Message Date
Doug Gregor
052d4c196c [Type checker] Pull the null check into swift::isSIMDOperator(). 2018-12-11 16:39:10 -08:00
Doug Gregor
88d34a1c7c [Constraint solver] De-priority SIMD operators.
The new SIMD proposal introduced a number of new operators, the presence of
which causes more "expression too complex" failures. Route around the
problem by de-prioritizing those operators, visiting them only if no
other operator could be chosen. This should limit the type checker
performance cost of said operators to only those expressions that need
them OR that already failed to type-check.

Fixes rdar://problem/46541800.
2018-12-11 16:34:37 -08:00
Doug Gregor
281e3c490c [Test] Re-enabled stdlib/ErrorBridgedStatic.
This test appears to have been fixed by
https://github.com/apple/swift/pull/21107. Fixes rdar://problem/42789939.
2018-12-09 20:51:26 -08:00
Saleem Abdulrasool
71c11b748e Merge pull request #21158 from compnerd/windows-enum
IRGen: address TODO for COMDATing
2018-12-09 15:36:46 -08:00
Slava Pestov
639ea2c6d5 Merge pull request #21155 from slavapestov/single-tuple-argument-again
Runtime: Fix metatype to mangling of function with single tuple-typed argument
2018-12-09 11:02:03 -05:00
Saleem Abdulrasool
f067cb7250 IRGen: address TODO for COMDATing
Enable COMDATing in `createFunction`.  This is particularly important
for the emission of the GetEnumTagSinglePayload.  The function emission
is marked as linkonce ODR but does not get COMDAT'ed currently, breaking
emission on PE/COFF targets like Windows.
2018-12-08 22:48:56 -08:00
Slava Pestov
2216c6bbfe Merge pull request #21153 from slavapestov/fully-concrete-generic-devirt
Fix devirtualization of conditional conformance where all generic parameters are concrete
2018-12-09 00:39:23 -05:00
Slava Pestov
6a80988b34 RemoteAST: Add a test to ensure we support multiple arguments vs a single tuple argument 2018-12-08 23:57:21 -05:00
Slava Pestov
929bf610e0 Runtime: Fix demangling of function with single tuple-typed argument
While declaration mangling now does the right thing for parameter lists,
the function type mangling unfortunately still models the parameter list
as a single tuple node.

Change the runtime's behavior to match the AST mangler, which wraps
a single tuple-typed parameter in a tuple node, so that we can produce
different mangling trees for function types taking multiple arguments
versus a single tuple argument.
2018-12-08 23:57:21 -05:00
Slava Pestov
1210bb68a4 SIL: SILFunctionTypes don't allow generic signatures where all parameters are concrete 2018-12-08 22:21:12 -05:00
Slava Pestov
11b1ce2ee7 SILGen: Drop generic signature from witness thunk if all parameters are concrete
SIL functions for AST declarations do this, and the SIL verifier enforces
this, so let's do it for witness thunks too, fixing a devirtualizer
crash.

Fixes <rdar://problem/46571799>.
2018-12-08 22:21:12 -05:00
swift-ci
29e4c67a72 Merge pull request #21145 from compnerd/elaborate 2018-12-08 13:47:17 -08:00
swift-ci
a1d904bdd8 Merge pull request #21148 from compnerd/the-runtime-stands-alone 2018-12-08 13:20:04 -08:00
Saleem Abdulrasool
347edc58dd build: always process include
The `include` subdirectory now generates a header which is used for the
runtime as well, making this directory a need irrespective of whether
the tools are being built or not.  This repairs the build of just the
runtime without the tools.
2018-12-08 12:14:05 -08:00
swift-ci
c259076e62 Merge pull request #21146 from compnerd/host-link-libraries 2018-12-08 12:10:49 -08:00
Saleem Abdulrasool
0da756e1df build: use target_link_libraries for DWARImporter
Use `target_link_libraries` for the linked libraries like the other host
libraries.  This is setup for migrating the host libraries and
executables to the LLVM build infrastructure and matches what the rest
of the host tools and libraries do.
2018-12-08 11:09:09 -08:00
Saleem Abdulrasool
4a91ce5629 ABI: use elaborated type for type reference (NFC)
Use the elaborated type for the type alias that we are creating.
Because the type inherits from `TargetMetadata`, the reference here is
parsed as a reference to the underlying type in MSVC.  Use the
elaborated type to resolve to the type itself.  The rules for these
changed around C++11, but MSVC defaults to the old style of the name
resolution.  NFC.
2018-12-08 11:04:43 -08:00
Slava Pestov
e34d67340a Merge pull request #21134 from slavapestov/circular-conformance-check-fail
Sema: Fix failure to emit a diagnostic when a protocol witness is being validated already
2018-12-07 22:54:41 -05:00
Slava Pestov
06c2e980cb Merge pull request #21133 from slavapestov/lazy-implicit-inits
Lazy synthesis of implicit constructors in non-primary files
2018-12-07 22:45:40 -05:00
Joe Groff
b2ceb4b753 Merge pull request #21102 from jckarter/unconditional-cast-source-loc-abi
Runtime: Provide ABI space for source location info in unconditional casts.
2018-12-07 19:04:59 -08:00
swift-ci
483f4eb624 Merge pull request #21135 from airspeedswift/test-contiguous-storage 2018-12-07 18:49:31 -08:00
Slava Pestov
18c7e9246d Merge pull request #21130 from slavapestov/remove-property-behaviors
Remove property behaviors
2018-12-07 21:48:01 -05:00
Slava Pestov
8c653332ef Sema: Fix failure to emit a diagnostic when a protocol witness is being validated already
Validating a declaration can trigger conformance checking. If the conformance checker
comes across the same declaration as a candidate witness, it would fail to emit a
diagnostic. As a result we would then go onto SILGen, which would crash while emitting
a witness table with a missing entry.

Fixes <rdar://problem/45151902>.
2018-12-07 20:44:59 -05:00
Slava Pestov
a55283d704 Sema: Lazy synthesis of implicit constructors in non-primary files 2018-12-07 20:39:27 -05:00
Slava Pestov
6c012b2aec AST: Remove some unnecessary LazyResolver * parameters from ASTContext methods 2018-12-07 20:39:27 -05:00
Slava Pestov
aa747dcd81 Remove property behaviors 2018-12-07 20:38:33 -05:00
Ben Cohen
11769d2494 Add tests for withContiguousStorageIfAvailable 2018-12-07 17:30:13 -08:00
Slava Pestov
e160b85f8f Merge pull request #21117 from slavapestov/accessor-synthesis-cleanup
Accessor synthesis cleanup (NFC)
2018-12-07 19:53:26 -05:00
Harlan Haskins
c829506aca Merge pull request #21033 from harlanhaskins/trouble-at-the-roller-rink
[Sema] Diagnose internal(set) from @inlinable functions
2018-12-07 15:33:18 -08:00
swift-ci
29946fe1af Merge pull request #21128 from nkcsgexi/api-digester-v 2018-12-07 15:31:19 -08:00
Bob Wilson
d24bb36aab Merge pull request #21119 from mikeash/existential-metatype-metadata-cast-fix
[Runtime] Fix incorrect cast in NonFixedExistentialMetatypeBox::Container::getNumWitnessTables.
2018-12-07 15:20:07 -08:00
Arnold Schwaighofer
1c229d70f4 Disable Benchmark_Driver.test-sh test
rdar://46565291
2018-12-07 14:36:53 -08:00
Xi Ge
33c0b4f4b2 swift-module-digester: test -v mode when diagnosing ABI/API changes. 2018-12-07 14:23:19 -08:00
Slava Pestov
a76012dc72 Sema: Tiny cleanup for createImplicitConstructor() 2018-12-07 17:11:30 -05:00
Slava Pestov
a6f6dc01bc Sema: Fix order dependency between lazy getter body synthesis and capture computation
If we computed captures before completing a lazy getter body, we would fail to
consider the 'self' capture properly. Instead make it resilient to such ordering
issues by checking in capture computation if the lazy property has a getter yet
or not.
2018-12-07 17:10:15 -05:00
Slava Pestov
ac53f89ffb Sema: Use a more specific type for ClosuresWithUncomputedCaptures 2018-12-07 17:10:08 -05:00
Slava Pestov
809a6dc3ed Sema: Remove dead code for 'lazy' properties that's no longer used 2018-12-07 17:10:08 -05:00
Slava Pestov
7aed494bf3 Sema: Move accessor synthesis to the callback mechanism
Also change some TypeChecker usages to ASTContext.
2018-12-07 17:10:08 -05:00
Slava Pestov
6d1b866cc1 AST: Fix FuncDecl::getSourceRange() to do the right thing for accessors with synthesized bodies 2018-12-07 17:10:08 -05:00
Slava Pestov
6f243d4ab3 AST: Plumb a 'context' parameter through to AbstractFunctionBody's body synthesizer 2018-12-07 17:10:08 -05:00
Saleem Abdulrasool
16df43494c Merge pull request #21122 from compnerd/building-blocks
build: simplify the blocks handling
2018-12-07 12:52:27 -08:00
Greg Parker
368ca184fa [runtime] Fix some bugs when the stable ABI's is-Swift bit is set. (#21114)
* cmake: Propagate SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT to overlay builds.
* runtime: Clear the correct bit in getROData()
* test/IRGen/objc_class_export.swift: Allow either is-Swift bit.
* test/stdlib/SwiftObjectNSObject.swift: Allow either name for SwiftObject.
2018-12-07 12:47:39 -08:00
Harlan Haskins
1abeeb8b92 [Sema] Diagnose internal(set) from @inlinable functions
This patch mainly consolidates the functions used to check accessors vs.
other decls, and makes sure we check setter access as well as regular
decl access.

rdar://45217648
2018-12-07 12:46:19 -08:00
Harlan Haskins
d30a3da32a [Sema] Non-requirement protocol members should inherit @usableFromInline
Previously, members of protocols that were not protocol requirements,
like accessors and typealiases, did not inherit @usableFromInline from
the parent protocol. Change this so they do.
2018-12-07 12:45:32 -08:00
Harlan Haskins
4adc80a8cf [test] Update @inlinable test to Swift 5
Also add a compatibility test for Swift 4.2 behavior
2018-12-07 12:42:05 -08:00
Argyrios Kyrtzidis
d235fdc582 Merge pull request #21116 from akyrtzi/break-dependency-cycles
[AST] Break dependency cycles of swiftAST against swiftSema and swiftClangImporter
2018-12-07 12:06:07 -08:00
Max Moiseev
290e9025fa Merge pull request #21118 from benrimmington/remove-interval-group-info
[stdlib] Remove Interval.swift from GroupInfo.json
2018-12-07 11:16:55 -08:00
Pavol Vaskovic
ec836bd04b Merge pull request #20861 from palimondo/a-tall-white-fountain-played
[benchmark] Janitor Duty, Legacy Factor: A-C
2018-12-07 19:49:06 +01:00
swift-ci
fab121ea97 Merge pull request #21123 from dcci/inoutagain 2018-12-07 10:25:32 -08:00
Argyrios Kyrtzidis
7653ccea54 [AST] minor nitpick in ProtocolConformance.cpp: the 'getASTContext().getClangModuleLoader()' call seems redundant 2018-12-07 10:24:33 -08:00