Commit Graph

1220 Commits

Author SHA1 Message Date
swift-ci
18fea54dd3 Merge remote-tracking branch 'origin/master' into master-next 2017-12-19 11:29:13 -08:00
swift-ci
adf83617ec Merge pull request #13526 from DougGregor/remove-conditional-conformances-flag 2017-12-19 11:17:44 -08:00
Doug Gregor
5c831a71ee Revert "[SE-0143] Put conditional conformances behind an "experimental" flag."
This reverts commit b59c30c1af.
2017-12-18 22:54:31 -08:00
swift-ci
fd21243bd6 Merge remote-tracking branch 'origin/master' into master-next 2017-12-18 17:08:54 -08:00
Ben Langmuir
122df2b00d Merge pull request #13510 from benlangmuir/cc-call-pattern-option
[code-complete] Try to make call-pattern completions usable again
2017-12-18 17:03:12 -08:00
swift-ci
0302515cf0 Merge remote-tracking branch 'origin/master' into master-next 2017-12-18 12:48:55 -08:00
David Zarzycki
54ea315586 [Basic] NFC: Stop using transparent unions 2017-12-16 10:43:49 -05:00
swift-ci
fbcb731ec1 Merge remote-tracking branch 'origin/master' into master-next 2017-12-15 13:49:31 -08:00
Ben Langmuir
93956eb34b [code-complete] Put call-pattern heuristics under a flag
The original hope was we could make these heuristics really good, but
since that is not currently in sight (and may never be), we want to be
able to turn them off.  For now, just plumb through an internal flag to
control the behaviour.  A future change will customize the behaviour in
SourceKit.

rdar://31113161
2017-12-15 13:23:44 -08:00
David Zarzycki
68a846e761 [AST] NFC: Do not hard code bit size of 'Kind' field
Also, give each class hierarchy at least 8 bits for the 'Kind' field.
In practice, no class hierarchy has more than 256 nodes, so this
optimizees code generation to make isa/dyn_cast faster.
2017-12-15 14:45:38 -05:00
David Zarzycki
97541e0d1e [Basic] NFC: Standardize and simplify inline bitfields
Inline bitfields are a common design pattern in LLVM and derived
projects, but the associated boilerplate can be demotivating and
brittle. This new header makes it easier to define and use inline
bitfields in Swift.

This also reorders some fields for better code generation.
2017-12-15 14:14:59 -05:00
swift-ci
3bd7e85d51 Merge remote-tracking branch 'origin/master' into master-next 2017-12-10 18:29:46 -08:00
Mark Lacey
d8f492e5d7 Squelch some warnings.
Fix up some dead code warnings as well as a warning for testing
whether an unsigned number is non-negative (which it always is).
2017-12-10 15:21:19 -08:00
swift-ci
31d959475d Merge remote-tracking branch 'origin/master' into master-next 2017-12-04 01:10:39 -08:00
Graydon Hoare
3726e69852 [NamedLazyMemberLoading] Flip flag polarity: on by default, optionally off. 2017-12-01 16:52:25 -08:00
swift-ci
75e5e6e1bd Merge remote-tracking branch 'origin/master' into master-next 2017-12-01 07:30:21 -08:00
Arnold Schwaighofer
eba12a7c3e Revert "Finish and default-enable named lazy member loading" 2017-12-01 07:25:54 -08:00
swift-ci
77e50e08da Merge remote-tracking branch 'origin/master' into master-next 2017-12-01 02:32:31 -08:00
swift-ci
7e6f7e1c04 Merge pull request #12843 from graydon/force-on-named-lazy-member-loading 2017-12-01 02:32:10 -08:00
Graydon Hoare
3de4297c91 [NamedLazyMemberLoading] Flip flag polarity: on by default, optionally off. 2017-11-30 22:01:05 -08:00
swift-ci
4815c1a745 Merge remote-tracking branch 'origin/master' into master-next 2017-11-28 19:50:29 -08:00
Ted Kremenek
e04c7fd00a Merge pull request #12964 from graydon/if-target-environment
#if targetEnvironment(simulator)
2017-11-28 19:39:44 -08:00
swift-ci
70a330ff22 Merge remote-tracking branch 'origin/master' into master-next 2017-11-28 17:09:44 -08:00
Doug Gregor
b59c30c1af [SE-0143] Put conditional conformances behind an "experimental" flag.
Conditional conformances aren't quite ready yet for Swift 4.1, so
introduce the flag `-enable-experimental-conditional-conformances` to
enable conditional conformaces, and an error when one declares a
conditional conformance without specifying the flag.

Add this flag when building the standard library (which will vend
conditional conformances) and to all of the tests that need it.

Fixes rdar://problem/35728337.
2017-11-28 16:01:51 -08:00
Graydon Hoare
3807b3fa1e [Parse] Add platform conditional targetEnvironment(simulator) 2017-11-28 13:51:01 -08:00
swift-ci
d3b8ffc42a Merge remote-tracking branch 'origin/master' into master-next 2017-11-14 12:09:04 -08:00
Erik Eckstein
90c21be191 Unify the implementation of optimization mode in various option classes.
This commit is mostly refactoring.

*) Introduce a new OptimizationMode enum and use that in SILOptions and IRGenOptions
*) Allow the optimization mode also be specified for specific SILFunctions. This is not used in this commit yet and thus still a NFC.

Also, fixes a minor bug: we didn’t run mandatory IRGen passes for functions with @_semantics("optimize.sil.never")
2017-11-14 11:25:02 -08:00
swift-ci
84a54bd654 Merge remote-tracking branch 'origin/master' into master-next 2017-11-09 11:09:14 -08:00
Alex Hoppen
746bfc6d59 [Refactoring] Add refactoring action to move type members to extension (#12795)
This implements SR-6297.
2017-11-09 11:08:34 -08:00
swift-ci
6f7b08c188 Merge remote-tracking branch 'origin/master' into master-next 2017-11-08 22:09:40 -08:00
Graydon Hoare
173e702da2 [Stats] Add a pair of counters to track failed processes. 2017-11-08 19:53:36 -08:00
swift-ci
a55239afad Merge remote-tracking branch 'origin/master' into master-next 2017-11-03 18:50:01 -07:00
Xi Ge
6af5d3c0bf libSyntax: rename KeepTokensInSourceFile to KeepSyntaxInfoInSourceFile. 2017-11-03 18:39:01 -07:00
swift-ci
de952fc5d1 Merge remote-tracking branch 'origin/master' into master-next 2017-11-01 18:28:59 -07:00
Doug Gregor
6007783fa5 [AST Verifier] Eliminate “sharding” of AST verification.
The only client of this (the parse_stdlib) tests didn’t need it and
are no longer using it.
2017-11-01 16:07:25 -07:00
swift-ci
f766bc3396 Merge remote-tracking branch 'origin/master' into master-next 2017-10-25 10:09:25 -07:00
Xi Ge
e861d51ccf libSyntax: implement the rule of five for OwnedString to ensure correct memory management. rdar://35116413 (#12610)
Thank you! @jrose-apple
2017-10-25 09:59:58 -07:00
swift-ci
9b151cf5b3 Merge remote-tracking branch 'origin/master' into master-next 2017-10-24 14:29:54 -07:00
Graydon Hoare
30b6fdce83 Merge pull request #12429 from graydon/named-lazy-member-loading
Named lazy member loading 1/N
2017-10-24 14:27:04 -07:00
swift-ci
5b0b7f1200 Merge remote-tracking branch 'origin/master' into master-next 2017-10-20 23:09:00 -07:00
Xi Ge
844aeae2d5 Re-apply "libSyntax: create a basic infrastructure for generating libSyntax entities by using Parser." (#12538) 2017-10-20 22:58:28 -07:00
Graydon Hoare
23fba147ee [NamedLazyMemberLoading] Add counters for success/failure. 2017-10-20 22:48:42 -07:00
Graydon Hoare
6bb5ce3d1e [NamedLazyMemberLoading] Add -enable-named-lazy-member-loading option 2017-10-20 22:48:42 -07:00
swift-ci
dbc718884f Merge remote-tracking branch 'origin/master' into master-next 2017-10-20 20:48:57 -07:00
swift-ci
b006d07342 Merge pull request #12294 from anemet/opt-remarks 2017-10-20 20:45:50 -07:00
Adam Nemet
9b9805420d Add optimization remarks
This allows reporting successful and unsuccessful optimizations similar to
clang/llvm.

This first patch adds support for the
options -Rpass=<pass-name-regex> -Rpass-missed=<pass-name-regex>.  These allow
reporting successful/unsuccessful optimization on the compiler output for passes
specified by the regex.  I've also added one missed and one passed remark type
to the inliner to test the infrastructure.

Clang also has the option of collecting these records in an external YAML data
file.  This will be added in a later patch.

A few notes:
* The goal is to use this facility for both user-lever "performance" warnings
and expert-level performance analysis.  There will probably be a flag in the
future differentiating the verbosity.

* The intent is match clang/llvm as much as it makes sense.  On the other hand I
did make some changes.  Unlike in llvm, the emitter is not a pass which
simplifies things.  Also the remark class hierarchy is greatly simplified since
we don't derive from DiagnosticInfo.  We also don't derive from Diagnostic to
support the streaming API for arbitrary named-value pairs.

* Currently function names are printed mangled which should be fixed.
2017-10-20 12:41:37 -07:00
Greg Parker
48a6b9d464 Revert "libSyntax: create a basic infrastructure for generating libSyntax entities by using Parser."
This reverts commit ee7a06276d.
It causes build failures like "'swift/Syntax/SyntaxNodes.h' file not found".
2017-10-19 17:11:48 -07:00
Xi Ge
ee7a06276d libSyntax: create a basic infrastructure for generating libSyntax entities by using Parser. 2017-10-18 17:02:00 -07:00
swift-ci
d1291cd36a Merge remote-tracking branch 'origin/master' into master-next 2017-10-16 22:09:22 -07:00
Erik Eckstein
f343659a75 Mangler: add a dump() function for debugging 2017-10-16 17:30:34 -07:00