Commit Graph

1953 Commits

Author SHA1 Message Date
David Ungar
0c2c7566c3 Merge pull request #20078 from davidungar/manual-rebasing-exp-deps
[Experimental Dependencies] Add -enable-experimental-dependencies and push it through.
2018-10-29 22:55:58 -07:00
David Ungar
1f4dfce598 Add -enable-experimental-dependencies and push it through. 2018-10-28 00:39:36 -07:00
Michael Gottesman
3f17bb6ddf Carefully split the build's invocation of add_swift_library into host/target variants.
The key thing here is that all of the underlying code is exactly the same. I
purposely did not debride anything. This is to ensure that I am not touching too
much and increasing the probability of weird errors from occurring. Thus the
exact same code should be executed... just the routing changed.
2018-10-27 12:58:51 -07:00
Graydon Hoare
b4a96bb182 [ModuleInterface] Write, read-back and test deps stored in .sid files. 2018-10-19 12:12:53 -07:00
Graydon Hoare
1f85e80f3f [ModuleInterface] Tighten up cache key for generated .swiftmodule. 2018-10-18 00:31:23 -07:00
Graydon Hoare
63e1e166db [ModuleInterface] Specify module as supplementary rather than main output. 2018-10-11 23:56:21 -07:00
Graydon Hoare
7b3149bd7c [ModuleInterface] Make ArgsToFrontendOptionsConverter more idempotent. 2018-10-11 23:56:21 -07:00
Graydon Hoare
5c05bb02cc [ModuleInterface] Save .swiftinterface args when either option synonym is present. 2018-10-11 23:56:21 -07:00
Graydon Hoare
2be23089a6 [ModuleInterface] Actually generate SIL for the module. 2018-10-11 23:56:20 -07:00
Graydon Hoare
1cce09627d [ModuleInterface] Escape arguments written to .swiftinterface comment. 2018-10-11 23:56:20 -07:00
Graydon Hoare
b71c55ab8b [ModuleInterface] Address misc review comments. 2018-10-11 23:56:20 -07:00
Graydon Hoare
410fc10045 [ModuleInterface] Conditionalize .swiftinterface loading by -enable-parseable-module-interface 2018-10-11 23:56:19 -07:00
Graydon Hoare
4f315363f8 [ModuleInterface] Change TY_SwiftModuleInterfaceFile to TY_SwiftParseableInterfaceFile 2018-10-11 23:56:19 -07:00
Graydon Hoare
5e202697a3 [ModuleInterface] Mop up remaining "textual interface" terminology. 2018-10-11 23:56:19 -07:00
Graydon Hoare
bf90c1ed08 [ModuleInterface] Add a TextualInterfaceModuleLoader to ASTContext. 2018-10-11 23:56:18 -07:00
Graydon Hoare
6ea9accbed [ModuleInterface] Add TextualInterfaceModuleLoader sketch. 2018-10-11 23:56:18 -07:00
Graydon Hoare
f9848e9392 [ModuleInterface] Extract ModuleCachePath from clang HeaderSearch. 2018-10-11 23:56:18 -07:00
Graydon Hoare
49feb51fff [ModuleInterface] Add llvm::Triple overload of setTargetTriple. 2018-10-11 16:43:52 -07:00
Graydon Hoare
86cd6ed909 [ModuleInterface] Move computeSerializationOptions to CompilerInvocation. 2018-10-11 16:43:52 -07:00
Graydon Hoare
45e6b25da4 [ModuleInterface] Rename TextualInterfaceGeneration.{cpp,h} to TextualInterfaceSupport.{cpp,h} 2018-10-11 16:43:51 -07:00
Graydon Hoare
9d0f8a58f6 [ModuleInterface] Add helpers to build Regexes to scan .swiftinterfaces. 2018-10-11 16:43:50 -07:00
Graydon Hoare
879ed583bf [ModuleInterface] Save TextualInterfaceOption invocation Args to TextualInterfaceFlags. 2018-10-11 16:43:49 -07:00
Graydon Hoare
c0f8dd20dd [ModuleInterface] Call printToolVersionAndFlagsComment when emitting .swiftinterface. 2018-10-11 16:43:49 -07:00
Graydon Hoare
acb8eb472d [ModuleInterface] Add TextualInterfaceOptions and printToolVersionAndFlagsComment. 2018-10-11 16:43:48 -07:00
Graydon Hoare
196fbbfc46 [ModuleInterface] Add new TextualInterfaceOption flag, move TextualInterfaceGeneration.{h,cpp} 2018-10-11 16:43:48 -07:00
Doug Gregor
264b680e96 Merge branch 'master' into immortal-type-checker 2018-10-10 20:36:23 -07:00
Doug Gregor
599e07e5d9 [Type checker] Keep the type checker alive as long as the ASTContext is.
It is possible for the SIL optimizers, IRGen, etc. to request information
from the AST that only the type checker can provide, but the type checker
is typically torn down after the “type checking” phase. This can lead to
various crashes late in the compilation cycle.

Keep the type checker instance around as long as the ASTContext is alive
or until someone asks for it to be destroyed.

Fixes SR-285 / rdar://problem/23677338.
2018-10-10 16:44:42 -07:00
Xi Ge
63bfbb5ec6 migrator: remove migration scripts for migrating from Swift 3. 2018-10-10 11:48:02 -07:00
Mark Lacey
36284ba377 Extend operator decls to allow any designated nominal type for lookup.
Rather than limiting this to protocols, allow any nominal type.

Rename -enable-operator-designated-protocols to
-enable-operator-designated-types to reflect the change.
2018-10-06 17:02:31 -07:00
Slava Pestov
30afc54918 Merge pull request #19707 from slavapestov/read-legacy-layout
Add support for reading YAML legacy type info dump
2018-10-05 15:22:48 -04:00
Slava Pestov
87ec607233 IRGen: Add a new 'Legacy' lowering mode that loads type info from a YAML file
The YAML format is the same one produced by the -dump-type-info
frontend mode.

For now this is only enabled if the -read-type-info-path frontend
flag is specified.

Progress on <rdar://problem/17528739>.
2018-10-04 23:33:17 -04:00
Jordan Rose
c38fcc1e96 [Driver] Expose -emit-parseable-module-interface[-path]
Commit to a command line option spelling so that build systems can
start testing it. I deliberately picked one of the longer names we
were considering because we can always decide to add a shorter alias,
but can't decide a shorter name was too generic.

Like the other supplementary output flags,
-emit-parseable-module-interface-path will emit a .swiftinterface file
to a particular path, while -emit-parseable-module-interface will put
it next to the main output (the one specified with -o).

rdar://problem/43776945
2018-10-04 17:50:04 -07:00
Jordan Rose
73d5ebaad2 Rename "textual interface" to "parseable interface" (#19713)
We already have something called "module interfaces" -- it's the
generated interface view that you can see in Xcode, the interface
that's meant for developers using a library. Of course, that's also a
textual format. To reduce confusion, rename the new module stability
feature to "parseable [module] interfaces".
2018-10-04 17:49:55 -07:00
Mark Lacey
1dcb06bdb4 Merge pull request #19698 from rudkx/designated-protocols
[ConstraintSystem] Use operator designated protocols to speed type checking.
2018-10-04 08:39:25 -07:00
Jordan Rose
3ea754481e [Frontend] Allow -emit-interface with -typecheck (#19676)
Textual module interfaces don't actually depend on SILGen, so we
shouldn't need to run SILGen (or serialize an entire binary module) if
we're just trying to emit a textual interface. On the other hand, if
we /are/ going to run SILGen and then SIL diagnostics, we shouldn't
delay those diagnostics by spending time emitting a textual interface,
or for that matter a TBD file.

Using this, update all the ModuleInterface tests that use
`-emit-module -o /dev/null` to use `-typecheck` instead, except for
those using `-merge-modules`.
2018-10-03 15:07:31 -07:00
Mark Lacey
a688464218 [ConstraintSystem] Add a staging option for the operator protocols work.
Add a staging option for enabling upcoming changes in the solver in
support of using the protocols designated in Policy.swift to guide
operator type checking.
2018-10-03 11:48:43 -07:00
Raj Barik
89d31be7a5 ExistentialSpecializer Pass (without SILCombine/ConcreteType Propagation) 2018-09-25 14:52:00 -07:00
Saleem Abdulrasool
597b4aec58 Frontend: force order of evaluation
The previous statement happened to work out of sheer luck.  `MainModule` is
initialized by the call to `getMainModule()`.  The expression could be evaluated
in any order, and in the Visual Studio case, was evaluated with the index
*first*.  At this point `MainModule` was uninitialized (fortunately, it was set
to NULL).  As a result, the `getName` call would fail.  Ensure that the
`MainModule` is initialized first by using a local variable.
2018-09-17 11:25:25 -07:00
Saleem Abdulrasool
4baa775726 Merge pull request #19297 from compnerd/unreachable
litter the tree with `llvm_unreachable`
2018-09-14 09:04:56 -07:00
Saleem Abdulrasool
93c0203658 Merge pull request #19256 from compnerd/sil-module-backwards
Frontend: include the SILModule header
2018-09-13 19:04:59 -07:00
Graydon Hoare
4a9b676183 Merge pull request #19306 from graydon/one-determined-heart
[Stats] Add SWIFTC_MAXIMUM_DETERMINISM to inhibit parallelism everywhere.
2018-09-13 19:01:38 -07:00
Graydon Hoare
5a563f59af [Stats] Add SWIFTC_MAXIMUM_DETERMINISM to inhibit parallelism everywhere. 2018-09-13 16:15:49 -07:00
Saleem Abdulrasool
d281b98220 litter the tree with llvm_unreachable
This silences the instances of the warning from Visual Studio about not all
codepaths returning a value.  This makes the output more readable and less
likely to lose useful warnings.  NFC.
2018-09-13 15:26:14 -07:00
Saleem Abdulrasool
e46529ea59 Frontend: make takeSILModule out-of-line
The use of `std::move` forces the complete definition of the `SILModule` type.
Move the definition out-of-line to allow a forward declaration of `SILModule`
instead.
2018-09-13 15:10:37 -07:00
Xi Ge
a7a06d7ce3 FrontendTool: parse all delayed member decls when we're dumping parse tree or verifying parse diagnostics. 2018-09-12 19:40:28 -07:00
Xi Ge
fe0046ba26 Parser: calculating interface hash only for primary files. 2018-09-07 14:24:30 -07:00
Mark Lacey
1e7dae3741 Merge pull request #19145 from rudkx/parse-designated-protocol
Add support for parsing designated protocols in operator declarations.
2018-09-06 22:01:02 -07:00
Xi Ge
b4356d4f93 Merge pull request #19104 from nkcsgexi/parser-laziness
Parser: lazily parse members in extension decls.
2018-09-06 15:24:17 -07:00
Xi Ge
24b0eac9a4 Parser: parse members in extension decls incrementally. 2018-09-05 17:00:39 -07:00
Mark Lacey
ae84ac81d4 Add a frontend option to enable parsing "operator protocol designators". 2018-09-04 23:10:30 -07:00