Commit Graph

34385 Commits

Author SHA1 Message Date
Max Moiseev
885b564bf5 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-09 17:16:37 -08:00
Xi Ge
94e999f312 ModuleGroup: Add several missing files to their groups. 2016-03-09 17:09:34 -08:00
Xi Ge
9a91075509 Serialization: Add an error when group information for a specific source file is not found. 2016-03-09 17:09:34 -08:00
Xi Ge
d81edcb6b6 ModulePrinting: Properly substitute via metatype to simplify complex bound generic types appearing in synthesized extensions. rdar://25063840 2016-03-09 17:09:34 -08:00
Max Moiseev
bcc08b6c3c fixing availability attribute hint for joinWithSeparator 2016-03-09 17:38:31 -07:00
Slava Pestov
41971fec99 SILGen: Introduce MaterializedLValue abstraction
This is used when materializing an LValue to share state between
the read and write phases of the access, replacing the 'temporary'
and 'extraInfo' parameters that were previously being passed around.

It adds two new fields, origSelfType and genericSig, which will be
used in an upcoming patch to actually apply the callback with the
current generic signature.

This will finally allow us to make use of materializeForSet
implementations in protocol extensions, which is a prerequisite
for enabling resilient default implementations of property and
subscript requirements.
2016-03-09 16:33:22 -08:00
Ben Langmuir
0bc2cc4290 [CodeCompletion] Negate incorrect comment NFC 2016-03-09 16:20:24 -08:00
Ben Langmuir
4a30637e08 [CodeCompletion] Don't complete unavailable methods in override
We generally don't want to override unavailable methods.  We already
filter out unavailable decls when completing values, but that's in a
separate visible decl consumer.

rdar://problem/25058233
2016-03-09 16:20:23 -08:00
Max Moiseev
aacc0f8293 merging RangeReplaceableCollectionType into RangeReplaceableCollection 2016-03-09 16:17:00 -08:00
Max Moiseev
02006f20bc Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-09 16:05:03 -08:00
John McCall
2840478147 When preparing necessary bindings, we sometimes decide to capture
bound generic type metadata rather than its individual components.
Don't crash when actually restoring that metadata.

Fixes SR-901.
2016-03-09 15:12:27 -08:00
practicalswift
479d7929fd Merge pull request #1595 from practicalswift/py3k-compatible-except
[Python] Use Py3k compatible "except" format
2016-03-09 23:16:47 +01:00
practicalswift
f4e1e458a0 Merge pull request #1594 from practicalswift/fix-old-style-classes
[Python] Use new style class definitions: "class A" → "class A(object)"
2016-03-09 23:16:26 +01:00
Mishal Shah
9e3f57e345 Merge pull request #1603 from shahmishal/master
Fix compare_perf_tests.py to support python 3
2016-03-09 14:08:46 -08:00
Ben Langmuir
19d13c3aee Reapply "[CodeCompletion] Don't show the loop index before it is visible"
With the tests updated to account for not having the correct behaviour
for brace-stmt items from after the code-completion point.  That part
turns out to be harder to fix.

This reverts commit a5325e6281.
2016-03-09 14:02:51 -08:00
Mishal Shah
046f0636b2 Fix compare_perf_tests.py to support python 3 2016-03-09 14:02:16 -08:00
Adrian Prantl
f6b969ff2e Revert "IRGenDebugInfo: Replace an obsolete workaround with an assertion."
This reverts commit ad4f065ad6.
2016-03-09 14:01:38 -08:00
Adrian Prantl
f2596958d6 Revert "Debug Info: Retreive the layout information of exploded values from the"
This reverts commit 7e489db91b.
2016-03-09 14:01:35 -08:00
Adrian Prantl
7e489db91b Debug Info: Retreive the layout information of exploded values from the
explosion schema rather than from the debug type information and retire
a bunch of heuristics that are no longer necessary.

To enable this, this commit also includes a bugfix to debug info for
opaque data structures with the correct size and alignment information.

<rdar://problem/21470869+22707597>
2016-03-09 13:51:33 -08:00
Adrian Prantl
ad4f065ad6 IRGenDebugInfo: Replace an obsolete workaround with an assertion.
rdar://problem/21470869
2016-03-09 13:51:33 -08:00
Arnold Schwaighofer
8df5ed5c53 Merge pull request #1599 from aschwaighofer/tune_withUnsafeMutableBufferPointer_for_inlining
Force inlining of Array.withUnsafeMutableBufferPointer
2016-03-09 13:36:48 -08:00
Xin Tong
43fcb6c20c More refactoring in FSO. NFC 2016-03-09 16:33:23 -05:00
Michael Gottesman
71c591b86e [lto] When determining the number of lto threads to use, take the minimum of ${BUILD_JOBS} and a heuristic that scales with the memory size of the machine.
This ensures that even if we have a machine with a huge amount of ram, we
respect ${BUILD_JOBS}.
2016-03-09 13:31:35 -08:00
Dmitri Gribenko
f9b306e766 Merge pull request #1597 from leogiertz/master
[FreeBSD] Include <cstdarg>, needed for va_start() etc.
2016-03-09 13:11:41 -08:00
Dmitri Gribenko
2b342cdc19 Merge pull request #1568 from rintaro/simplify-transcode
[stdlib] Simplify transcode implementation
2016-03-09 13:05:05 -08:00
Arnold Schwaighofer
3738178a43 Force inlining of Array.withUnsafeMutableBufferPointer
We do this to enable removal of the closure (allocation).

The size of the libSwiftCore.dylib grows by 300 bytes. A program (such as
benchmark/single-source/unit-tests/StackPromo.swift) that uses one invocation of
withUnsafeMutableBufferPointer shrinks by roughly 500 bytes.
2016-03-09 13:01:05 -08:00
Michael Gottesman
9c998d7ce8 [leaks-runner] Get more accurate results by subtracting two differing iteration counts.
Previously, we had some white listing lists for allocations that were assigned
into globals during a benchmarks running. Now we instead run two different
iterations with the second running an additional time. Then we subtract the
counts.

This enables me to get rid of the whitelist.
2016-03-09 12:56:15 -08:00
Xin Tong
ae745ccaed Split SignatureOptimzer::analyze(). NFC.
Do some preparations to split function signature into 3 function passes.

analyze() has become a dumping ground for code to analyze parameters and result.

Split it into 2 functions.
2016-03-09 15:22:45 -05:00
Ben Langmuir
6581eba8e6 [CodeCompletion] Improve ordering of prefix matches vs popular names
In the experimental code-completion path.

rdar://problem/24843463
2016-03-09 11:23:06 -08:00
Joe Groff
77dd9b2992 Split exact-subclass and bindable-to-subclass queries.
In many places, we're interested in whether a type with archetypes *might be* a superclass of another type with the right bindings, particularly in the optimizer. Provide a separate Type::isBindableToSuperclassOf method that performs this check. Use it in the devirtualizer to fix rdar://problem/24993618. Using it might unblock other places where the optimizer is conservative, but we can fix those separately.
2016-03-09 11:14:45 -08:00
Leo Giertz
70816b7cf8 Just include <cstdarg> unconditionally 2016-03-09 19:49:15 +01:00
Daniel Duan
9b00e35290 [Parser] refactor nested 'init' diagnostics. NFC
Add better comment. Replace a dyn_cast with cast per Jordan's observation.
2016-03-09 10:38:50 -08:00
Michael Gottesman
ccc8791581 [leaks-checker] Add support for filtering tests and changing the number of samples/iters run. This will make it easy to bisect using the Benchmark_LeaksRunner script. 2016-03-09 10:28:00 -08:00
Michael Gottesman
91f106e199 [leak-checker] Make sure to actually enable the leak checker when compiling with the leak checker presets.
Fixes refactoring error in 14c0a3e3f6fd61d36b795b4e7a9bf820d1aafb45...

*shakes head*.
2016-03-09 09:44:29 -08:00
Chris Lattner
2aaccee71c Revert "Progress towards nested generic typealiases." apparently broke an LLDB test.
This reverts commit 2896fbb586.
2016-03-09 09:26:27 -08:00
Leo Giertz
9787a72288 [FreeBSD] Include <stdarg.h>, needed for va_start etc. 2016-03-09 17:11:01 +01:00
Arnold Schwaighofer
e9ac8c876a Add a performance unit test for stack promotion 2016-03-09 07:30:00 -08:00
practicalswift
6641eba4de [Python] Use Py3k compatible "except" format 2016-03-09 10:04:13 +01:00
Michael Gottesman
14c0a3e3f6 Refactor the leaks runner preset into stdlib-R and stdlib-RA presets. 2016-03-09 01:02:23 -08:00
Dmitri Gribenko
c267ec9f31 Merge pull request #1589 from apple/add-iphoneos-armv7s
Allow swift to be built for iphoneos-armv7s, a variation on armv7,
2016-03-09 00:55:24 -08:00
practicalswift
c69ffe4eb6 [Python] Use new style class definitions: "class A" → "class A(object)" 2016-03-09 09:42:42 +01:00
Michael Gottesman
e232456bf0 [leaks-runner] Print out the RC delta with the results. 2016-03-09 00:37:14 -08:00
practicalswift
89c7cd3e84 Merge pull request #1593 from practicalswift/double-spaces-ii
[gardening] Fix recently introduced accidental double space
2016-03-09 09:01:46 +01:00
practicalswift
5258486f58 [gardening] Fix recently introduced accidental double space 2016-03-09 09:00:26 +01:00
Argyrios Kyrtzidis
c939234d1f [test] Modify the test so that it can pass on linux as well. 2016-03-08 23:59:13 -08:00
Argyrios Kyrtzidis
345d05e2e9 Introduce an internal attribute '@_show_in_interface' to be used in stdlib for underscored protocols that
should be shown in the interface.

Also switch the option and hide all underscored protocols by default, unless they are marked with the new attribute.
2016-03-08 23:30:58 -08:00
Chris Lattner
2896fbb586 Progress towards nested generic typealiases. They still don't work, but add a
(failing) testcase and progress towards supporting them.
2016-03-08 23:19:56 -08:00
practicalswift
30b66ea036 Merge pull request #1584 from practicalswift/python-3-compatible-print
[Python] Use Py3k compatible print operator: print "foo" → print("foo")
2016-03-09 08:00:49 +01:00
Michael Gottesman
0645b30caf Fix deadlock in leaks runner script. 2016-03-08 22:18:36 -08:00
Ted Kremenek
8f7cf6cf31 Merge pull request #51 from BrandonMathis/chore/docs
Update some Readme strucutre and styles
2016-03-08 22:18:16 -08:00