Commit Graph

7767 Commits

Author SHA1 Message Date
practicalswift
3e40296cfa [gardening] Fix inconsistent headers 2017-02-13 15:21:52 +01:00
Hugh Bellamy
cb3bdcc2a3 Merge pull request #7408 from hughbe/llvm-fallthrough
Use relatively new LLVM_FALLLTHROUGH instead of our own SWIFT_FALLTHROUGH
2017-02-13 17:39:59 +07:00
therealbnut
a9618f8dab Fix swift build warning - 'default will never be executed' 2017-02-13 20:21:48 +11:00
Hugh Bellamy
f001b7562b Use relatively new LLVM_FALLLTHROUGH instead of our own SWIFT_FALLTHROUGH 2017-02-12 10:47:03 +07:00
Slava Pestov
8b01cb6e24 Merge pull request #7243 from ikesyo/gardening-seq-to-array-conversion
[gardening] Prefer `Array(seq)` over `seq.map { $0 }`
2017-02-11 19:42:23 -08:00
Hugh Bellamy
d457742a8d Change getKeyIntValueForDump to use intptr_t rather than long 2017-02-12 09:46:36 +07:00
Hugh Bellamy
a94f65cb5e Include llvm/Support/Compiler.h wherever we use __has_attribute 2017-02-12 09:30:22 +07:00
Hugh Bellamy
3a9ddbdb7a Work around Visual Studio bug inferring type of auto 2017-02-12 09:29:19 +07:00
Hugh Bellamy
16777011ab Merge pull request #7407 from hughbe/cygwin-port-conditional-compilation
Simplify CygwinPort.cpp conditional compilation
2017-02-12 09:02:22 +07:00
Hugh Bellamy
379652d268 Merge pull request #7406 from hughbe/llvm-runtime
Use LLVM_* attributes some more in the runtime
2017-02-12 08:55:41 +07:00
Saleem Abdulrasool
08751a8bb2 stdlib: add sys.user module for Linux
sys/user.h provides definitions for registers.  It would previously get
merged into the sys module which could result in it being multiply
included (as in the case of libdispatch).  Add an explicit submodule.
Noticed when building libdispatch on Linux AArch64.
2017-02-11 14:50:56 -08:00
Greg Parker
ff2f056868 Tweak whitespace. 2017-02-11 12:51:20 -08:00
Hugh Bellamy
e9a0679493 Simplify CygwinPort.cpp conditional compilation 2017-02-11 17:31:59 +07:00
Hugh Bellamy
00b7c2ed70 Use LLVM_* attributes in the runtime 2017-02-11 17:30:01 +07:00
Roman Levenstein
1b3d29a163 Merge pull request #6092 from swiftix/wip-generics-inlining-flag-4
Enable inlining of generics
2017-02-10 20:13:36 -08:00
Roman Levenstein
a755f5e133 Disable inlining of generics when creating the set of pre-specializations for -Onone. 2017-02-10 16:44:48 -08:00
swift-ci
fd6b9fe0ec Merge pull request #7338 from ktopley-apple/dispatch-time-nanos 2017-02-10 13:29:49 -08:00
ktopley-apple
0cb1561035 Adding documentation to clarify the result of DispatchTime(uptimeNanoseconds: 0) (#7342)
(Radar 28814085)
(SR-2807)
2017-02-10 12:37:57 -08:00
Avjinder
12de833a55 42 * 42 is 1764, not 1746. 2017-02-09 21:18:23 +05:30
Doug Gregor
12fc2d22bf [Standard library] de-GYB string interpolation. NFC 2017-02-08 21:01:18 -08:00
Doug Gregor
fbb7dcf971 Replace concrete init(stringInterpolationSegment:)'s with generic ones
Remove 16 concrete init(stringInterpolationSegment:) overloads and
replace them with 3 generic overloads, significantly reducing the
exponential blow-up from larger string interpolations.

Fixes rdar://problem/29389887.
2017-02-08 21:01:09 -08:00
Doug Gregor
e387361194 Revert "Replace concrete init(stringInterpolationSegment:)'s with generic ones"
This reverts commit f6cac54606.
2017-02-08 13:38:11 -08:00
Doug Gregor
bb365b4657 Revert "[Standard library] de-GYB string interpolation. NFC"
This reverts commit 658f244188.
2017-02-08 13:38:10 -08:00
Doug Gregor
0b4261cae1 Revert "[Standard library] Remove some gyb-related cruft from string interpolation."
This reverts commit d0811cc318.
2017-02-08 13:38:08 -08:00
Kim Topley
65032a6898 DispatchTime.uptimeNanoseconds returns incorrect value on some platforms.
(Radar 30332506)
2017-02-08 10:34:08 -08:00
Maxim Moiseev
8b95cc48de [stdlib] Fixing compilation warnings (#7314)
<rdar://problem/30320630>
2017-02-08 10:07:49 -08:00
swift-ci
d5e57ee691 Merge pull request #7337 from eeckstein/revert-reflection-mangling 2017-02-08 09:48:31 -08:00
Erik Eckstein
254f36aba5 Revert "Use the new mangling for reflection."
This needs some changes in lldb.
Disabled for now until lldb supports the new mangling.

This reverts commit 21ba292943.
2017-02-08 09:01:51 -08:00
Erik Eckstein
6a1ff0293e stdlib: a small fix in _typeByName
The demangling tree was not correct and this did’t work with the old re-mangler.
2017-02-08 09:01:51 -08:00
Nate Cook
c25bf40c26 [stdlib] Various documentation improvements
* Revise type(of:)
* Revise withoutActuallyEscaping(_:do:)
* Add slicing / index sharing to Collection
* Other cleanups
2017-02-07 23:02:41 -06:00
Erik Eckstein
21ba292943 Use the new mangling for reflection.
For this we are linking the new re-mangler instead of the old one into the swift runtime library.
Also we are linking the new de-mangling into the swift runtime library.

It also switches to the new mangling for class names of generic swift classes in the metadata.
Note that for non-generic class we still have to use the old mangling, because the ObjC runtime in the OS depends on it (it de-mangles the class names).
But names of generic classes are not handled by the ObjC runtime anyway, so there should be no problem to change the mangling for those.
The reason for this change is that it avoids linking the old re-mangler into the runtime library.
2017-02-07 08:36:21 -08:00
Erik Eckstein
fd62be59a1 stdlib: Use the re-mangler for _typeByName
The old method of constructing a mangled class name does not work anymore with the new mangling scheme.
Also, by using the re-mangler, _typeByName now works with class names containing non-ascii characters.
2017-02-07 08:36:21 -08:00
Saleem Abdulrasool
1466a5e6e1 Merge pull request #7147 from spevans/pr_link_args
Add dependancy for Linux static-stdlib link argument files
2017-02-05 16:48:45 -08:00
Saleem Abdulrasool
b80553b9a1 build: use CMAKE_LINKER rather than hardcoding the linker
This breaks the build on exherbo, which uses target tripled linker
names.  Furthermore, the default name on unix-ish systems for the linker
is `ld`.  This can be a symlink to a specific implementation, usually
named as ld.<name> (e.g. `ld.bfd` or `ld.gold`).  Use the cmake variable
for the linker rather than hardcoding the name.
2017-02-05 13:27:15 -08:00
practicalswift
aa59098ad7 Merge pull request #7239 from practicalswift/gardening-20170203
[gardening] Fix typos. Fix word processor artefacts. Fix duplicate includes. Fix clang-tidy warnings.
2017-02-04 13:27:22 +01:00
Syo Ikeda
e2b03a98dd [gardening] Prefer Array(seq) over seq.map { $0 } 2017-02-04 10:37:22 +09:00
swift-ci
b15f0162e6 Merge pull request #7238 from moiseev/explicit-int32 2017-02-03 16:28:16 -08:00
Max Moiseev
ab1422b8ef [tests] Fixing mixed-type arithmetics warnings in the test suite 2017-02-03 15:50:31 -08:00
Andrew Trick
22f166437e Revert "Revert "[stdlib] Resolve unsafeBitCast warnings in Runtime.swift.gyb."" 2017-02-03 13:31:10 -08:00
practicalswift
23b09dac73 [gardening] Use correct year in copyright headers 2017-02-03 20:38:30 +01:00
swift-ci
2fd07f22a3 Merge pull request #7227 from apple/revert-7116-unsafeBitCast-Runtime.swift.gyb 2017-02-03 10:04:49 -08:00
Doug Gregor
0f99d18343 Merge pull request #7024 from rintaro/stdlib-newtype-comparable
[stdlib] Workaround type checker ambiguity in Comparable SwiftNewtypeWrapper
2017-02-03 09:55:42 -08:00
Andrew Trick
e62a57f243 Revert "[stdlib] Resolve unsafeBitCast warnings in Runtime.swift.gyb." 2017-02-03 09:46:04 -08:00
Jordan Rose
139699432b [stdlib] Resolve unsafeBitCast warnings in Runtime.swift.gyb. (#7116)
No intended functionality change.
2017-02-03 08:25:51 -08:00
Max Moiseev
644ee19b60 [stdlibunittest] Correctly handling the case when no output is captured for a crash.
If we expect to see an empty string in the output after the crash, it
would fail in case output is empty.
2017-02-02 09:44:28 -08:00
ktopley-apple
4854530db0 Fixes crash when DispatchData is created from an UnsafeBufferPointer<Uint8> with a nil address. (#7194)
Radar 29337927
2017-02-02 09:33:45 -08:00
Doug Gregor
d0811cc318 [Standard library] Remove some gyb-related cruft from string interpolation.
NFC
2017-02-01 10:51:02 -08:00
Philippe Hausler
1a2687a72e [Foundation] Convert Data’s SubSequence type to be Data
Data can encapsulate it’s own sub-sequence type by housing a range of the slice in the structural type for Data. By doing this it avoids the API explosion of supporting all APIs that take Data would need overloads to take a slice of Data. This does come at a small conceptual cost: any index based iteration should always account for the startIndex and endIndex of the Data (which was an implicit requirement previously by being a Collection). Moreover this prevents the requirement of O(n) copies of Data if it is never mutated while parsing sub sequences; so more than an API amelioration this also could offer a more effecient code-path for applications to use.
2017-02-01 08:50:23 -08:00
Hugh Bellamy
1d2aa8dcbd Cleanup uses of SWIFT_RUNTIME_EXPORT in implementation files (#7127) 2017-01-31 19:38:53 -08:00
Hugh Bellamy
d030ae4c94 Cleanup uses of SWIFT_RT_ENTRY_VISIBILITY (#7103) 2017-01-31 15:53:14 -08:00