Commit Graph

1646 Commits

Author SHA1 Message Date
swift_jenkins
766832d57d Merge remote-tracking branch 'origin/main' into next 2020-11-30 14:09:40 -08:00
Alexis Laferrière
2328132f4f Merge pull request #34832 from xymus/rmodule-loading
[Frontend] Intro flag to remark on loaded modules location
2020-11-30 12:58:20 -08:00
swift_jenkins
3bfd2a4bc7 Merge remote-tracking branch 'origin/main' into next 2020-11-30 11:31:01 -08:00
Arnold Schwaighofer
8346bf7e90 Pre-specialization: This is an experimental feature
Only enable if explicitly required.
2020-11-20 09:13:16 -08:00
Alexis Laferrière
de42b1f2fa [Frontend] Optional remarks on loaded modules location
Passing the frontend flag -Rmodule-loading makes the compiler emit
remarks with the path of every module loaded. The path for Swift modules
is either the swiftinterface file for modules built with library
evolution or the binary swiftmodule otherwise. The path for clangmodules
is always in the cache which could be improved as it may be less useful.

Here's an extract of the output for a simple SwiftUI app:

<unknown>:0: remark: loaded module from
/Users/xymus/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/2VJP7CNCGWRF0/SwiftShims-18ZF6992O9H75.pcm
<unknown>:0: remark: loaded module from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftinterface
<unknown>:0: remark: loaded module from
/Users/xymus/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/2VJP7CNCGWRF0/os-1HVC6DNXVU37C.pcm
<unknown>:0: remark: loaded module from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/usr/lib/swift/os.swiftmodule/x86_64-apple-ios-simulator.swiftinterface
<unknown>:0: remark: loaded module from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk/System/Library/Frameworks/SwiftUI.framework/Modules/SwiftUI.swiftmodule/x86_64-apple-ios-simulator.swiftinterface
2020-11-19 20:06:23 -08:00
swift_jenkins
365f00d32a Merge remote-tracking branch 'origin/main' into next 2020-11-16 22:37:55 -08:00
Slava Pestov
5808d9beb9 Parse: Remove parse-time name lookup 2020-11-16 22:39:44 -05:00
swift_jenkins
ef6363472e Merge remote-tracking branch 'origin/main' into next 2020-11-16 15:57:12 -08:00
Ben Barham
79b7d5fa99 [Frontend] Disable skipping any function bodies for SwiftOnoneSupport 2020-11-16 15:09:53 +10:00
Andrew Trick
8e792ad38c Merge remote-tracking branch 'origin/main' into 'origin/next' 2020-11-12 22:44:09 -08:00
Alexis Laferrière
b72b0c30fa Merge pull request #34612 from xymus/dont-skip-nested-types
[Sema] Add flag to optimize building swiftmodule files preserving type info for LLDB
2020-11-12 19:16:21 -08:00
Alexis Laferrière
02c134372f [Sema] Add option to skip non-inlinable functions without types
This frontend flag can be used as an alternative to
-experimental-skip-non-inlinable-function-bodies that doesn’t skip
functions defining nested types. We want to keep these types as they are
used by LLDB. Other functions ares safe to skip parsing and
type-checking.

rdar://71130519
2020-11-12 14:28:09 -08:00
swift_jenkins
9786acd193 Merge remote-tracking branch 'origin/main' into next 2020-11-10 14:39:06 -08:00
Ben Barham
241559dc88 [Serialization] Add an option to output modules regardless of errors
Adds a new frontend option
"-experimental-allow-module-with-compiler-errors". If any compilation
errors occur while generating the .swiftmodule, this mode will skip SIL
entirely and only serialize the (likey invalid) AST.

This existence of this option during generation is serialized into the
resulting .swiftmodule. Errors found in deserialization are only allowed
if it is set.

Primarily intended for IDE requests (eg. indexing and code completion)
to ensure robust cross-module results, despite possible errors.

Resolves rdar://69815975
2020-11-10 14:47:22 +10:00
swift_jenkins
971243f0fe Merge remote-tracking branch 'origin/main' into next 2020-11-06 15:36:54 -08:00
swift-ci
f82e962262 Merge pull request #34609 from apple/disable-implicit-concur-import 2020-11-06 15:16:45 -08:00
swift_jenkins
fb55248b20 Merge remote-tracking branch 'origin/main' into next 2020-11-06 10:16:47 -08:00
Slava Pestov
e1526a9b82 Merge pull request #34565 from slavapestov/conformance-availability-part1
Sema: (Mostly) check conformance availability
2020-11-06 12:49:05 -05:00
Kavon Farvardin
242e9fe464 add the -disable-implicit-concurrency-module-import hidden flag 2020-11-06 08:54:01 -08:00
swift_jenkins
e9f94eac71 Merge remote-tracking branch 'origin/main' into next 2020-11-05 20:52:57 -08:00
Ben Barham
7cee600bcd [SILGen] Add flag to skip typechecking and SIL gen for function bodies
Adds a new flag "-experimental-skip-all-function-bodies" that skips
typechecking and SIL generation for all function bodies (where
possible).

`didSet` functions are still typechecked and have SIL generated as their
body is checked for the `oldValue` parameter, but are not serialized.
Parsing will generally be skipped as well, but this isn't necessarily
the case since other flags (eg. "-verify-syntax-tree") may force delayed
parsing off.
2020-11-06 12:08:19 +10:00
Slava Pestov
ceb8675ad1 Sema: (Mostly) check conformance availability
If a conformance is defined in an extension, we now look for
references to the conformance in types and expressions and
respect's the extension's availability (or deprecation, etc).

The conformance checker itself still needs to check conformance
availability of associated conformances and the like; that will
be a separate change.

Note that conformances defined on types don't require any
special handling, since they are as available as the
intersection of the conforming type and the protocol.

By default, we diagnose conformance availability violations
where the OS version is not sufficiently new as warnings, to
avoid breaking source compatibility. Stricter behavior where
these violations are diagnosed as errors is enabled by passing
the -enable-conformance-availability-errors flag. There are
test cases that run both with and without this flag. In the
future, we hope to make the stricter behavior the default,
since after all, violations here can result in link errors and
runtime crashes.

Uses of completely unavailable conformances are still always
diagnosed as errors, even when this flag is not passed in.

Progress on <rdar://problem/35158274>.
2020-11-05 17:51:45 -05:00
swift_jenkins
d73adae0f2 Merge remote-tracking branch 'origin/main' into next 2020-10-29 18:01:19 -07:00
Alejandro Alonso
424802fb34 Revert SE-0283 (#34492)
Reverted despite build failures.
2020-10-29 17:32:06 -07:00
David Smith
0180aca9fc Merge branch 'main' into david/fix-merge-conflict 2020-10-27 13:05:20 -07:00
Azoy
df9778e2e8 [Compatibility53] Add compatibility library for 5.3 and backport tuple Equatable conformance
Fix some comments

Unnecessary cast
2020-10-22 18:27:03 -04:00
Holly Borla
1e0038c3be [ConstraintSystem] Remove implementation of operator designated types
in the solver.
2020-10-14 16:05:54 -07:00
swift_jenkins
9acf6daff8 Merge remote-tracking branch 'origin/main' into next 2020-10-08 09:37:09 -07:00
Alexis Laferrière
fa6f1b6b96 Merge pull request #33439 from xymus/expand-avail
[Sema] Define availability specification macros with a frontend flag
2020-10-08 09:25:32 -07:00
Alexis Laferrière
c6fc53e844 [Sema] Define availability via compiler flag
Introduce availability macros defined by a frontend flag.
This feature makes it possible to set the availability
versions at the moment of compilation instead of having
it hard coded in the sources. It can be used by projects
with a need to change the availability depending on the
compilation context while using the same sources.

The availability macro is defined with the `-define-availability` flag:

swift MyLib.swift -define-availability "_iOS8Aligned:macOS 10.10, iOS 8.0" ..

The macro can be used in code instead of a platform name and version:
@available(_iOS8Aligned, *)
public func foo() {}

rdar://problem/65612624
2020-10-06 11:25:20 -07:00
swift_jenkins
7c5560ed3b Merge remote-tracking branch 'origin/main' into next 2020-10-04 12:00:54 -07:00
Slava Pestov
989b825f9d Frontend: Disable parse-time name lookup by default 2020-10-03 21:53:33 -04:00
Erik Eckstein
69edd5020a Merge remote-tracking branch 'origin/main' into next 2020-10-03 21:10:11 +02:00
Slava Pestov
854e1e482f Frontend: Add -enable-parser-lookup flag
This is for re-enabling it once it is turned off by default.
2020-10-03 09:37:55 -04:00
swift_jenkins
8963fd93b1 Merge remote-tracking branch 'origin/main' into next 2020-10-02 12:06:07 -07:00
Robert Widmann
964f640636 Drop "Private Deps" Flag
In order for type body fingerprints to work, these declarations must always be included. Drop the ability to turn this off.
2020-10-01 14:40:45 -07:00
Robert Widmann
74765a8ba8 Remove Type Body Fingerprints Flags
This infrastructure has more than proven itself. Drop the code paths and tests supporting the status quo.
2020-10-01 13:09:00 -07:00
swift_jenkins
b1fa15fe87 Merge remote-tracking branch 'origin/main' into next 2020-09-29 23:14:40 -07:00
Varun Gandhi
37efac9ff8 Manually merge origin/main into origin/next.
Resolved conflict in lib/ClangImporter/ImportType.cpp.
2020-09-23 08:10:08 -07:00
Slava Pestov
4bbdb95f4f Frontend: Remove no-op -stress-astscope-lookup flag 2020-09-23 01:26:06 -04:00
Varun Gandhi
7b967a8030 Merge pull request #33085 from varungandhi-apple/vg-clang-types-in-sil-retry
Propagate Clang function types through SIL
2020-09-22 08:48:34 -07:00
swift_jenkins
7220ae3d2e Merge remote-tracking branch 'origin/master' into master-next 2020-09-21 13:26:46 -07:00
Robert Widmann
8c913e385e Remove LegacyCascadingDependencies 2020-09-21 10:42:33 -06:00
swift_jenkins
fa85356b82 Merge remote-tracking branch 'origin/master' into master-next 2020-09-17 20:44:00 -07:00
Michael Gottesman
4cbc07c6c6 [ownership] Add a frontend option to stop optimizing right before we lower ownership.
Specifically the option: -sil-stop-optzns-before-lowering-ownership. This makes
it possible to write end-to-end tests on OSSA passes. Before one would have to
pattern match after ownership was lowered, losing the ability to do finegrained
FileCheck pattern matching on ossa itself.
2020-09-17 18:02:33 -05:00
Varun Gandhi
983399c1e7 [Printer] Conditionally print Clang types in emitted SIL. 2020-09-16 10:34:43 -07:00
swift_jenkins
9fad113519 Merge remote-tracking branch 'origin/master' into master-next 2020-09-15 17:33:17 -07:00
Saleem Abdulrasool
507ffe6832 Merge pull request #32690 from compnerd/grand-unified-module-theory
Unified Swift Module Layout
2020-09-15 17:23:15 -07:00
Pavel Yaskevich
dd374a1d52 Merge remote-tracking branch 'origin/master' into fix-merge-master-master-next 2020-09-15 11:44:10 -07:00
Saleem Abdulrasool
bdb3da805c Frontend: allow directory layout for Swift on non-Darwin platforms
Adjust the serialized module loader to allow directory layouts for the
Swift module on non-Darwin targets, unifying the layout across all the
platforms.  It also eases cross-architecture and cross-platform
development by having the same layout, which can enable more similar
flag usage.
2020-09-13 10:55:38 -07:00