Commit Graph

3346 Commits

Author SHA1 Message Date
John McCall
0fb407943f [NFC] Rename swift_runtime_unreachable to swift_unreachable and make it use LLVM's support when available. 2020-10-03 02:54:56 -04:00
swift_jenkins
a3167223fa Merge remote-tracking branch 'origin/main' into next 2020-10-02 20:02:15 -07:00
Robert Widmann
3972a13e57 Merge pull request #34156 from ferologics/patch-1
Fix “descriminator” typos
2020-10-02 19:48:03 -07:00
swift_jenkins
519fcf2dfa Merge remote-tracking branch 'origin/main' into next 2020-10-02 13:20:14 -07:00
Joe Groff
95f1bd3bf8 Merge pull request #34142 from jckarter/async-await-sil-instructions
SIL: Add instructions to represent async suspend points.
2020-10-02 13:19:49 -07:00
swift_jenkins
ac3020727d Merge remote-tracking branch 'origin/main' into next 2020-10-01 23:38:03 -07:00
Fero
b0b546873c Fix typo 2020-10-02 01:26:33 +02:00
Joe Groff
a664a33b52 SIL: Add instructions to represent async suspend points.
`get_async_continuation[_addr]` begins a suspend operation by accessing the continuation value that can resume
the task, which can then be used in a callback or event handler before executing `await_async_continuation` to
suspend the task.
2020-10-01 14:21:52 -07:00
Xi Ge
8ccee27db7 ModuleInterface: refactor ModuleInterfaceChecker out of ModuleInterfaceLoader
This refactoring allows us to drop ModuleInterfaceLoader when explicit modules
are enabled. Before this change, the dependencies scanner needs the loader to be
present to access functionalities like collecting prebuilt module candidates.
2020-10-01 10:30:48 -07:00
swift_jenkins
b1fa15fe87 Merge remote-tracking branch 'origin/main' into next 2020-09-29 23:14:40 -07:00
Varun Gandhi
3016a898bd Merge pull request #34102 from varungandhi-apple/vg-gate-clang-type-serde
[Serialization] Gate Clang type (de)serialization behind UseClangFunctionTypes
2020-09-29 09:14:58 -07:00
Varun Gandhi
8e63a4b43f [Serialization] Gate Clang type (de)serialization behind UseClangFunctionTypes. 2020-09-28 14:29:26 -07:00
Robert Widmann
617c8ce8f4 Merge pull request #34080 from CodaFi/crosswalk
Teach The Legacy Driver to Unpack Incremental Dependency Information From swiftmodule Files
2020-09-25 18:07:39 -06:00
Andrew Trick
ea0da3fcdb Merge pull request #34074 from atrick/make-fieldidx-unique
Change SIL ref_element_addr getFieldNo() to return a unique index.
2020-09-25 14:38:46 -07:00
Robert Widmann
7917d723c3 Teach the Driver to Read Fine-Grained Dependency Graphs in Swiftdeps Files 2020-09-25 11:36:11 -06:00
Andrew Trick
5ae231eaab Rename getFieldNo() to getFieldIndex().
Do I really need to justify this?
2020-09-24 22:44:13 -07:00
Robert Widmann
d2e7bdcfab Teach SwiftModules To Embed Incremental Information
Take advantage of the binary swiftdeps serialization utliities built during #32131. Add a new optional information block to swiftdeps files. For now, don't actually serialize swiftdeps information.

Frontends will use this information to determine whether to write incremental dependencies across modules into their swiftdeps files. We will then teach the driver to deserialize the data from this section and integrate it into its incremental decision making.
2020-09-24 20:07:01 -06:00
Robert Widmann
8e73d213a0 [NFC] Add Incremental Info Bits to ModuleFileSharedCore 2020-09-24 20:07:01 -06:00
Robert Widmann
e0d67f4fb2 [NFC] Refine the Return Type of SerializedModuleLoaderBase::loadAST
This grants access to the name of the loaded file to clients, which will be important for the upcoming cross-module incremental build experiments.
2020-09-24 11:32:31 -06:00
Varun Gandhi
734b8a2533 Merge pull request #33986 from varungandhi-apple/vg-import-filter-cleanup
[NFC] Clarify import filtering logic and naming.
2020-09-23 18:23:11 -07:00
Varun Gandhi
4b5d885114 [NFC] Clarify semantics of getImportedModules.
The lack of clarity manifested as unexpected behavior when using
getImportedModules to create the module import graph. The new behavior
makes SPI-ness and Shadowing-ness behave similarly in terms of
filtering. We also check if a filter is well-formed to avoid
accidental empty import lists.
2020-09-23 12:50:37 -07:00
Varun Gandhi
d3369f7711 [NFC] Rename ImportFilterKind cases to be clearer. 2020-09-23 12:50:20 -07:00
swift_jenkins
7220ae3d2e Merge remote-tracking branch 'origin/master' into master-next 2020-09-21 13:26:46 -07:00
Robert Widmann
7bee5ffc0c Remove NLOptions::NL_Known* 2020-09-21 10:37:41 -06:00
swift_jenkins
bd2d87de62 Merge remote-tracking branch 'origin/master' into master-next 2020-09-18 21:27:04 -07:00
Slava Pestov
d4cc35a938 AST: Remove VarDecl::hasNonPatternBindingInit() 2020-09-18 16:11:06 -04:00
Slava Pestov
d7f4b1a1bd AST: Capture list bindings now point back to their parent CaptureListExpr
We'll need this to get the right 'selfDC' when name lookup
finds a 'self' declaration in a capture list, eg

class C {
  func bar() {}
  func foo() {
    _ = { [self] in bar() }
  }
}
2020-09-18 02:59:15 -04:00
swift_jenkins
3265b1e877 Merge remote-tracking branch 'origin/master' into master-next 2020-09-16 07:02:37 -07:00
Slava Pestov
8e83dd902f Sema: Don't compute isSimpleDidSet() from getStorageImplInfo() 2020-09-15 22:03:58 -04:00
swift_jenkins
9fad113519 Merge remote-tracking branch 'origin/master' into master-next 2020-09-15 17:33:17 -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
swift_jenkins
b37089c76b Merge remote-tracking branch 'origin/master' into master-next 2020-09-10 22:30:58 -07:00
Brent Royal-Gordon
4be67a6be1 [NFC] Further simplify ModuleFile::associateWithFileContext 2020-09-10 19:08:29 -07:00
Brent Royal-Gordon
7bfeeebcb9 [NFC] Add helper to parse import paths in strings 2020-09-10 19:08:29 -07:00
Brent Royal-Gordon
cff4ddf13a [NFC] Adopt new ImportPath types and terminology
# Conflicts:
#	lib/IDE/CodeCompletion.cpp
2020-09-10 19:07:49 -07:00
swift_jenkins
a2ada574cb Merge remote-tracking branch 'origin/master' into master-next 2020-09-09 19:51:09 -07:00
Alexis Laferrière
69c11b6070 [Serialization] Remove documentation for the extInfo parameter 2020-09-09 16:12:01 -07:00
swift_jenkins
4ef2f4a838 Merge remote-tracking branch 'origin/master' into master-next 2020-09-05 12:06:34 -07:00
Michael Gottesman
c89b5ac01b [serialization] Rename ResultVal -> ResultInst.
This is a misnomer from when SILInstructions were always single valued.

NFC.
2020-09-04 22:52:11 -07:00
swift_jenkins
8ff32135ba Merge remote-tracking branch 'origin/master' into master-next 2020-09-04 20:54:34 -07:00
Michael Gottesman
4fa57aef13 [serialization] Refactor from large SILInstruction loop, writeNoOperandLayout handler.
NFC.
2020-09-04 18:03:33 -07:00
swift_jenkins
39a0bc2296 Merge remote-tracking branch 'origin/master' into master-next 2020-09-03 21:31:53 -07:00
Rintaro Ishizaki
bec6a8f07e Merge pull request #33789 from rintaro/serialization-modulefile-extinfo
[Serialization] Minor ModuleFile/ModuleFileSharedCore improvements
2020-09-03 19:21:04 -07:00
Holly Borla
3332df6f89 Merge pull request #33777 from hborla/rename-storage-wrapper
[NFC][Property Wrappers] Rename "storage wrapper var" to "projection var/projected value"
2020-09-03 18:29:04 -07:00
Rintaro Ishizaki
6a0a448b01 [Serialization] Remove extInfo param from ModuleFileSharedCore::load()
Populated 'ExtendedValidationInfo' is not used at all.
2020-09-03 14:51:28 -07:00
Nathan Hawes
e882f15a1a Manually merge remote-tracking branch 'upstream/master' into HEAD
Conflicts:
	lib/Frontend/CompilerInvocation.cpp
	lib/Frontend/ModuleInterfaceLoader.cpp
	lib/Serialization/ModuleFile.cpp
2020-09-03 11:31:12 -07:00
Rintaro Ishizaki
b7c19656ab [Serialization] Minor ModuleFile/ModuleFileSharedCore improvements
* Add properties to ModuleFile which holds information from the control
  block.
* 'ExtendedValidationInfo' parameter for 'ModuleFileSharedCore::load()'
  cannot be 'nullptr'. Make it non-defaulted Rvalue reference.
2020-09-03 11:18:43 -07:00
Xi Ge
e107182f1a Merge remote-tracking branch 'apple/master' into master-rebranch 2020-09-02 18:36:37 -07:00
Holly Borla
3fd882cadf [NFC] Rename "storage wrapper var" to "projection var" or "projected value"
in property wrapper-related code.
2020-09-02 18:07:40 -07:00
swift_jenkins
5dc6566769 Merge remote-tracking branch 'origin/master' into master-next 2020-09-02 16:11:38 -07:00