Commit Graph

1220 Commits

Author SHA1 Message Date
swift-ci
1c573717a9 Merge remote-tracking branch 'origin/master' into master-next 2017-10-13 17:09:34 -07:00
Graydon Hoare
2d29292157 [Stats] Document counters in include/swift/Basic/Statistics.def 2017-10-13 15:59:36 -07:00
swift-ci
46cd5f99d2 Merge remote-tracking branch 'origin/master' into master-next 2017-10-10 16:29:37 -07:00
Michael Gottesman
a05f4f6666 [stl-extras] Add a range version of std::accumulate. 2017-10-09 13:36:18 -07:00
swift-ci
025f3a5039 Merge remote-tracking branch 'origin/master' into master-next 2017-09-27 11:49:27 -07:00
David Ungar
9f178f57e2 Merge pull request #12137 from davidungar/fixing-radar-34475709
Moves formerly statically-allocated RecursiveSharedTimer(s) effectively into ASTContext
2017-09-27 11:38:19 -07:00
swift-ci
9a59d0e479 Merge remote-tracking branch 'origin/master' into master-next 2017-09-27 00:49:24 -07:00
Joe Shajrawi
065d1917c3 if 'count' happens to be UINT64_MAX - set it to UINT64_MAX - 1. 2017-09-26 18:55:22 -07:00
David Ungar
443ab7d950 git-clang-format 2017-09-26 18:02:35 -07:00
David Ungar
7759d3cdda Clean up 2017-09-26 18:00:42 -07:00
David Ungar
90b456b116 Use if (auto for getting Stats 2017-09-26 17:32:38 -07:00
David Ungar
a41a3c9fa5 compiles using movable guards 2017-09-26 17:22:58 -07:00
David Ungar
2af86f5cac First compiling run, WIP 2017-09-26 16:07:07 -07:00
Joe Shajrawi
75939510cd PGO: Use ProfileCounter instead of Optional<uint64_t> to hold profile counts 2017-09-26 13:34:46 -07:00
swift-ci
135a4286b5 Merge remote-tracking branch 'origin/master' into master-next 2017-09-25 10:29:30 -07:00
John McCall
6d9294f565 Random improvements for ArrayRefView. 2017-09-25 02:05:23 -04:00
John McCall
4fdccaf737 Allow IntRange to range over enum values. 2017-09-25 02:05:23 -04:00
Bob Wilson
0276b0f89d Merge remote-tracking branch 'origin/master' into master-next 2017-09-23 10:09:35 -07:00
Graydon Hoare
85dda86130 Merge pull request #12071 from graydon/trace-stats-deltas
Trace stats deltas
2017-09-22 22:25:58 -07:00
swift-ci
a448d28b77 Merge remote-tracking branch 'origin/master' into master-next 2017-09-22 18:09:44 -07:00
Calvin Hill
aee81d272f Add Initial platform support for Haiku. (#11583) 2017-09-22 21:06:56 -04:00
Graydon Hoare
205f725d6e [stats] Add UnifiedStatsReporter::FrontendStatsTracer 2017-09-22 19:15:34 -04:00
Graydon Hoare
7e1cf168a8 [stats] Factor out UnifiedStatsReporter fields to a .def file 2017-09-22 02:01:06 -04:00
swift-ci
e8b0e7a81f Merge remote-tracking branch 'origin/master' into master-next 2017-09-15 16:49:46 -07:00
Jordan Rose
82fa3627a8 Merge pull request #11867 from jrose-apple/ClangImporter-episode-V
[ClangImporter] Support Swift 5 API notes
2017-09-15 16:34:27 -07:00
Jordan Rose
9a04bee421 [ClangImporter] Turn ImportNameVersion into a struct.
...so that we don't have to keep coming back to update it every major
release. And also so we can actually put methods on it instead of
using free functions.

No intended behavior change (yet).
2017-09-15 14:30:24 -07:00
swift-ci
b51e2e6837 Merge remote-tracking branch 'origin/master' into master-next 2017-09-15 13:29:49 -07:00
Joe Groff
2ba8f57514 Remove staging flag for unimplemented key path components.
All the originally-planned component kinds are now implemented.
2017-09-15 11:55:35 -07:00
swift-ci
60cf68ee6b Merge remote-tracking branch 'origin/master' into master-next 2017-09-12 14:30:14 -07:00
swift-ci
ad59688523 Merge remote-tracking branch 'origin/master' into master-next 2017-09-12 13:10:30 -07:00
Xi Ge
87ce54e3f2 Re-apply "Paser: IfConfigDecl should reflect the underlying source. rdar://34315827" 2017-09-12 12:59:25 -07:00
Xi Ge
2a07534bc1 Revert "Paser: IfConfigDecl should reflect the underlying source. rdar://34315827"
For test failure witnessed in bots: https://ci.swift.org/job/oss-swift-incremental-RA-osx/462/
2017-09-12 12:49:02 -07:00
swift-ci
ccedf5316f Merge remote-tracking branch 'origin/master' into master-next 2017-09-12 12:09:55 -07:00
Xi Ge
bfe6a64708 Paser: IfConfigDecl should reflect the underlying source. rdar://34315827 2017-09-12 11:58:49 -07:00
swift-ci
546836ceff Merge remote-tracking branch 'origin/master' into master-next 2017-09-11 15:08:53 -07:00
Alex Hoppen
1c7e289b96 [Mangling] Adjust subscript mangling to not include "subscript"
Change the mangling of accessors to have a variable or subscript node
as their only child node, while subscript nodes no longer contain a decl
name.
2017-09-10 19:44:07 +02:00
Michael Gottesman
7248221d40 [stl-extras] Provide next_or_default and prev_or_default helpers for iterators.
These work like next_or_end or prev_or_begin, except that instead of forcing the
default value to be the compared against the value, you can specify the value
used upon going out of range.

i.e., instead of:

(x, y) -> (x == y) ? y : std::next(x)

We have:

(x, y, z) -> (x == y) ? z : std::next(x)

This is a strict generalization of next_or_end and prev_or_begin so I
re-implemented both routines in terms of the new routines, so no source needed
to be updated.
2017-09-09 16:23:12 -07:00
swift-ci
15b9edafa8 Merge remote-tracking branch 'origin/master' into master-next 2017-09-08 16:08:58 -07:00
Pavel Yaskevich
fcd0069d8d [ConstraintSolver] NFC: Increase default shrinking termination threshold
We've found in practice that multiple different types of expressions
are still going to benefit from shrinking continuing even when it
couldn't simplify up to 10 sub-expressions.
2017-09-08 14:37:20 -07:00
swift-ci
2a867dd9d3 Merge remote-tracking branch 'origin/master' into master-next 2017-09-08 10:29:01 -07:00
Xi Ge
34e2aec662 Parser: use parser to generate a refined token stream to help syntax coloring. (#11809)
This patch allows Parser to generate a refined token stream to satisfy tooling's need. For syntax coloring, token stream from lexer is insufficient because (1) we have contextual keywords like get and set; (2) we may allow keywords to be used as argument labels and names; and (3) we need to split tokens like "==<". In this patch, these refinements are directly fulfilled through parsing without additional heuristics. The refined token vector is optionally saved in SourceFile instance.
2017-09-08 10:28:19 -07:00
swift-ci
f0fb66b5e6 Merge remote-tracking branch 'origin/master' into master-next 2017-08-30 20:49:04 -07:00
swift-ci
fa76c56996 Merge pull request #11613 from CodaFi/refined-imported-goods 2017-08-30 20:48:24 -07:00
swift-ci
c4625d3fe9 Merge remote-tracking branch 'origin/master' into master-next 2017-08-30 09:29:07 -07:00
Jordan Rose
f8b7db4e76 Excise the terms "blacklist" and "whitelist" from Swift source. (#11687)
The etymology of these terms isn't about race, but "black" = "blocked"
and "white" = "allowed" isn't really a good look these days. In most
cases we weren't using these terms particularly precisely anyway, so
the rephrasing is actually an improvement.
2017-08-30 09:28:00 -07:00
Robert Widmann
75a83da03e Implement SE-0075: CanImport
This implementation required a compromise between parser
performance and AST structuring.  On the one hand, Parse
must be fast in order to keep things in the IDE zippy, on
the other we must hit the disk to properly resolve 'canImport'
conditions and inject members of the active clause into the AST.
Additionally, a Parse-only pass may not provide platform-specific
information to the compiler invocation and so may mistakenly
activate or de-activate branches in the if-configuration decl.

The compromise is to perform condition evaluation only when
continuing on to semantic analysis.  This keeps the parser quick
and avoids the unpacking that parse does for active conditions
while still retaining the ability to see through to an active
condition when we know we're moving on to semantic analysis anyways.
2017-08-28 18:35:06 -04:00
swift-ci
b95d234c7a Merge remote-tracking branch 'origin/master' into master-next 2017-08-26 02:49:00 -07:00
Slava Pestov
771584a269 AST/Basic: Add isSwiftVersionAtLeast() check
Recently support was added for '-swift-version 5' to the frontend.

Right now we only have an isSwiftVersion3() check which returns 'true'
if the version is 3, and returns 'false' if it is 4 or 5. This was used
during Swift 4.0 development to guard various legacy behaviors that we
wish to deprecate.

Going forward, when do not want to add isSwiftVersion4() and
isSwiftVersion5() checks, because they're too fragile; if a new
behavior is introduced in Swift 5 that we wish to disable in Swift 3
and Swift 4 mode, checking for isSwiftVersion5() is insufficient,
because eventually Swift 6 will roll around, and presumably one would
expect the new behavior to take effect in Swift 6 mode as well.

I think a better solution is a 'isSwiftVersionAtLeast()' check, which
checks if the major version number is greater than or equal to the
given value.

We could refactor the existing 'isSwiftVersion3()' checks to instead
do '!isSwiftVersionAtLeast(4)', but I'm going to hold off on doing that
for now.
2017-08-26 01:18:15 -07:00
swift-ci
c62ef5c9d7 Merge remote-tracking branch 'origin/master' into master-next 2017-08-25 19:48:51 -07:00
John McCall
fa9de8068f Remove operator* from RelativePointer so we can use T=void. 2017-08-25 20:02:57 -04:00