Commit Graph

2952 Commits

Author SHA1 Message Date
Max Moiseev
6a5739f3c3 Changing == and < on UnsafeRawPointer to static funcs 2016-11-30 10:17:32 -08:00
Max Moiseev
d2d814edef Changing == and < on UnsafeRawPointer to static funcs 2016-11-29 16:00:23 -08:00
Max Moiseev
2b50c6fadc Fixing the benchmark crash
... by removing the + - overloads for Strideable, and only leaving them
for pointers (both Strideable and _Pointer).

Strideable was used in the past to simplify advancing collection
indices, but with new collection indexing model it is no longer
necessary to overload `+` and `-` for all strideable types..
2016-11-29 15:55:46 -08:00
Simon Evans
1daa3ee1f8 [SR-648] Add option to create statically linked binaries
- Add ImageInspectionStatic.cpp to lookup protocol conformance
  and metadata sections in static binaries

- For Linux, build libswiftImageInspectionShared.a and
  libswiftImageInspectionStatic.a for linking with libswiftCore.a.
  This allows static binaries to be built without linking to
  libdl. libswiftImageInspectionShared (ImageInspectionELF.cpp) is
  automatically compiled into libswiftCore.so

- Adds -static-executable option to swiftc to use along with
  -emit-executable that uses linker arguments in
  static-executable-args.lnk. This also requires a libicu
  to be compiled using the --libicu which has configure options
  that dont require libdl for accessing ICU datafiles

- Static binaries only work on Linux at this time
2016-11-29 13:36:19 +00:00
Simon Evans
70e79094e4 Optionally compile libicu
- Add --libicu option to compile icu from source. This allows the
  configuration to be controlled so that it is enabled for shared
  and static building and the static files dont require the use of
  the dynamic loader

- Add --install-libicu option to install the shared libraries into
  $prefix/lib/swift and the static ones into $prefix/lib/swift_static.
  This avoids interference with system installed versions

- Dont use find_package if building ICU from source
2016-11-29 13:36:18 +00:00
Max Moiseev
3aba0f7f2b Removing unary + for floating point types and changing the unary - to a static method
Addresses: <rdar://problem/16424438>
2016-11-28 15:56:22 -08:00
Max Moiseev
70b2343626 Merge branch 'master' into new-integer-protocols 2016-11-28 15:25:01 -08:00
Max Moiseev
164232d346 adding type hints in signum implementation 2016-11-28 15:24:08 -08:00
Rintaro Ishizaki
f6668a263d [stdlib] Adjust precedence of '->' operator
Precedence of '->' was too low.
`_ = () -> Int` was folded as:
  (arrow
    (assign
      (discard_assignment_expr)
      (tuple_expr))
    (unresolved_declref))
It should be:
  (assign
    (discard_assignment_expr)
    (arrow
      (tuple_expr)
      (unresolved_declref)))
2016-11-24 10:46:36 +09:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
practicalswift
93aa6bfef5 Merge pull request #5881 from practicalswift/remove-initializepointer
Remove unused internal struct _InitializePointer<T>
2016-11-20 17:34:44 +01:00
practicalswift
a08f2f9777 Merge pull request #5882 from practicalswift/remove-isuniqueorpinnedreference
Remove unused internal function _isUniqueOrPinnedReference()
2016-11-20 17:34:36 +01:00
practicalswift
e8cb435d99 Remove unused variable CountableSelf 2016-11-20 13:59:55 +01:00
practicalswift
40d3b60f73 Remove unused internal function _isUniqueOrPinnedReference() 2016-11-20 13:59:21 +01:00
practicalswift
81e93c7ca6 Remove unused internal struct _InitializePointer<T> 2016-11-20 13:58:38 +01:00
Alexis Beingessner
28656578be Merge pull request #5850 from Gankro/empty
[runtime] statically initialize the empty Dictionary and Set singletons
2016-11-19 16:51:48 -05:00
Max Moiseev
c0d624f6e2 Minor improvements 2016-11-18 18:56:26 -08:00
Max Moiseev
28b0da2faf Avoiding recursive calls to init(extendingOrTruncating:) and speeding up == 2016-11-18 18:36:32 -08:00
Max Moiseev
deead1f1a4 Faster comparisons with integer literals 2016-11-18 16:05:06 -08:00
Alexis Beingessner
ae648c1564 Merge pull request #5840 from Gankro/docit
minor cleanup in HashedCollections
2016-11-18 17:53:54 -05:00
Alexis Beingessner
21405f1ac1 [runtime] statically construct the Dictionary and Set singletons 2016-11-18 13:56:57 -05:00
Max Moiseev
97981907e1 Merge branch 'master' into new-integer-protocols 2016-11-18 09:36:02 -08:00
Ben Cohen
3016d5e960 Merge pull request #5845 from airspeedswift/replace-as-with-is
Replace (x as? Y) != nil with x is Y
2016-11-18 09:31:38 -08:00
Slava Pestov
9a4c0488ba stdlib: SetIndex and DictionaryIndex can now be nested types of Set and Dictionary
Resolves ABI FIXME #34 and <rdar://problem/17002096>.
2016-11-18 00:39:15 -08:00
Max Moiseev
3faa9aac0b optimizing preconditions 2016-11-17 16:24:59 -08:00
Max Moiseev
716a378d62 Merge branch 'master' into new-integer-protocols 2016-11-17 12:19:41 -08:00
Ben Cohen
05b63ebffb Replace (x as? Y) != nil with x is Y 2016-11-17 11:26:36 -08:00
Alexis Beingessner
8caa9f4cd1 minor cleanup in HashedCollections 2016-11-17 13:33:15 -05:00
Ben Cohen
44b3a0016e Fix typo in RRC.removeSubrange comment example 2016-11-17 09:22:36 -08:00
Max Moiseev
953d919a22 Merge branch 'master' into new-integer-protocols 2016-11-16 14:46:31 -08:00
Max Moiseev
ffeeaca8b1 Using faster initializer for integers where appropriate 2016-11-16 14:45:33 -08:00
Max Moiseev
6104f86e39 Simplifying masking shift implementation on concrete integers 2016-11-16 14:45:33 -08:00
Max Moiseev
ffc8a37811 Strideable for _Pointer is not necessary in Swift 4
All the necessary methods and operators are already implemented for
concrete pointer types more efficiently.
2016-11-16 14:45:33 -08:00
Max Moiseev
60751f614a Hiding the shift operators of type (Self, Int) -> Self 2016-11-16 14:45:33 -08:00
Max Moiseev
8fea72db20 Using more masking shifts 2016-11-16 14:45:32 -08:00
Maxim Moiseev
32feae52b6 Marking .abs() method for floating point types as obsolete in Swift 4 (#5810)
* Marking .abs() method for floating point types as obsolete in Swift 4

...and deprecated in Swift 3.1
2016-11-16 14:00:10 -08:00
Alexis Beingessner
7536b9420e Merge pull request #5722 from Gankro/unmanaged
Resolve ABI FIXME#158
2016-11-16 16:42:25 -05:00
swift-ci
67f4ae078b Merge pull request #5723 from natecook1000/nc-fixes-05 2016-11-15 16:47:20 -08:00
Alexis Beingessner
ad0a9daf8f Resolve ABI FIXME#158 2016-11-15 17:36:21 -05:00
Nate Cook
534bea8f9f [stdlib] Update revisions with feedback 2016-11-15 15:00:10 -06:00
Slava Pestov
ba72188927 stdlib: Fix resilient build 2016-11-14 18:03:11 -08:00
Chris Williams
2857b1cbc8 SE-0080 (4/5) - Failable initializers for Int->Float 2016-11-14 17:04:49 -08:00
Slava Pestov
7c1adfe31d Runtime: Use metadata accessor functions in Reflection.mm and make sure they're public
Correct behavior with resilience requires calling accessors instead
of using the metadata symbols directly.

For some reason this file gets linked in with SwiftRuntimeTests too,
so make the types @_versioned in the stdlib.

Fixes <rdar://problem/29213794>.
2016-11-14 16:25:23 -08:00
Nate Cook
20ce99a255 [stdlib] Fix example in String.CharacterView discussion 2016-11-14 15:43:50 -06:00
Max Moiseev
f34808be11 using masking shifts 2016-11-14 10:16:28 -08:00
Max Moiseev
92813be403 Merge branch 'master' into new-integer-protocols 2016-11-11 16:14:57 -08:00
Nate Cook
9b2128eb35 [stdlib] Add missing trivial type info to withUnsafeBytes 2016-11-11 14:03:37 -06:00
Nate Cook
7ca1c4b2fe [stdlib] Fix incorrect operator name 2016-11-11 12:51:24 -06:00
practicalswift
38351faefc [gardening] Fix recently introduced typos 2016-11-11 18:35:01 +01:00
Nate Cook
bd6025f463 [stdlib] Various documentation fixes
- Fix incorrect type in Float(_:String) examples
- Expand discussions for ExpressibleBy_Literal protocols
- Add notes about non-escaping unsafe pointers from closures
- Add note about isEmpty to Collection.count discussions
- Describe imported `Bool` types
- Clean up some floating point discussions
- Provide some additional operator documentation
- Revise documentation for CVarArg functions
- Fix incorrect Set method parameter descriptions
- Clarify array bridging behavior
- Add collection subscript complexity notes
2016-11-11 11:23:49 -06:00