Commit Graph

2617 Commits

Author SHA1 Message Date
Diego Torres
7168a9ea6a Resolve unnecessary buffer copy in HashedCollections 2016-12-11 21:54:09 +01:00
Alexis Beingessner
ec4c99377e Merge pull request #6127 from Gankro/escape-fix
[stdlib] remove unsafe escaping closure hack
2016-12-09 14:43:34 -05:00
Hooman Mehr
d7d05e1a92 Make .significandWidth do the right thing for exact powers of two
Resolves SR-2868.
2016-12-08 14:49:19 -05:00
Alexis Beingessner
aba7ade5e9 [stdlib] remove unsafe escaping closure hack 2016-12-07 15:43:18 -05:00
Mishal Shah
b01eb90844 Merge pull request #6103 from apple/revert-5978-redundant-array-init-removal
Revert "SILOptimizer: Replace Array.append(contentsOf: with Array.append(elem…"
2016-12-06 15:03:34 -08:00
Maxim Moiseev
bfae2471d6 [stdlib] operators on pointer types to static funcs (#6100) 2016-12-06 13:32:32 -08:00
Mishal Shah
5eece8860f Revert "SILOptimizer: Replace Array.append(contentsOf: with Array.append(elem…" 2016-12-06 11:26:15 -08:00
Alexis Beingessner
b4d30b7c1a Merge pull request #5988 from Gankro/roundup
[stdlib] delete dead code
2016-12-05 22:19:27 -05:00
Slava Pestov
a32e11a0de Merge pull request #6064 from slavapestov/killing-substituted-type-access-check
Refactor accessibility checking to use TypeReprs (most of the time) rather than Types
2016-12-05 13:19:58 -08:00
Roman Levenstein
e34ae86be4 Merge pull request #5978 from ben-ng/redundant-array-init-removal
SILOptimizer: Replace [].append(contentsOf:) with [].append(element:)
2016-12-05 11:24:08 -08:00
Ben Ng
1b10c18b3e SILOptimizer: Replace [].append(contentsOf:) with [].append(element:) 2016-12-05 12:27:42 -05:00
Slava Pestov
d1b753c46a Sema: Remove a workaround for an accessibility problem in the standard library 2016-12-04 23:57:11 -08:00
Ben Cohen
30fc489b9b Remove trampolines for using concrete hashable types with Set/Dictionary of AnyHashable 2016-12-02 15:38:07 -08:00
Nate Cook
df8486dc0d Merge pull request #5994 from Gankro/doc-ptr
Fixups for UnsafePointer documentation
2016-12-02 11:27:22 -06:00
Alexis Beingessner
ff82c1e59f [docs] Change argument name to match docs. 2016-11-30 18:35:54 -05:00
Alexis Beingessner
8e4f98ff42 [docs] downgrade internal notes to normal comments. 2016-11-30 18:35:54 -05:00
Alexis Beingessner
3d0d3e17a9 [docs] Add GEP preconditions to UnsafePointer.
Offsets lower to GetElementPointer inbounds, which specifies that it's
Undefined Behaviour for the result to be out of bounds, regardless of if
the result is actually dereferenced.
2016-11-30 18:35:54 -05:00
Joe Groff
1f6a8ff3ea Merge pull request #5394 from spevans/pr_libicu_with_static_executable
[SR-648] Add option to create statically linked binaries (take 2)
2016-11-30 12:34:58 -08:00
Alexis Beingessner
bd50a6a5c6 [stdlib] delete dead code 2016-11-30 15:17:20 -05:00
Max Moiseev
6a5739f3c3 Changing == and < on UnsafeRawPointer to static funcs 2016-11-30 10:17:32 -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
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
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
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
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
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
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