Joe Groff
c4ec47ddea
IRGen/Runtime: Metadata for @convention(c) function types.
...
For now, C&P a new metadata cache for C function pointers, like we do for blocks and thin types.
Swift SVN r27595
2015-04-22 18:06:23 +00:00
Dave Abrahams
f82b18e1e5
[stdlib] Mirror: descendant class suppression
...
Swift SVN r27593
2015-04-22 17:23:59 +00:00
Dave Abrahams
d3f52de076
[stdlib] Mirror: handle chaining
...
Swift SVN r27592
2015-04-22 17:23:58 +00:00
Dave Abrahams
5f30f6bf23
[stdlib] Mirror: internal renaming
...
Swift SVN r27591
2015-04-22 17:23:57 +00:00
Dave Abrahams
877056f1fb
[stdlib] Mirror: store descendant representation
...
Swift SVN r27590
2015-04-22 17:23:56 +00:00
Dave Abrahams
45d72b9a02
[stdlib] Reorder Mirror parameters to match docs
...
Swift SVN r27589
2015-04-22 17:23:55 +00:00
Dave Abrahams
d955f0fae3
[stdlib] Revise Mirror initializer documentation
...
...explaining how the ancestor and descendant representation options
affect the result. NFC.
Swift SVN r27588
2015-04-22 17:23:55 +00:00
Dave Abrahams
ee72b0dc2f
[stdlib] Mirror: internal factorization
...
Swift SVN r27587
2015-04-22 17:23:54 +00:00
Dmitri Hrybenko
971598e430
Revert "stdlib: fix a warning"
...
This reverts commit r27570. The SDK on buildbots is too old.
Swift SVN r27572
2015-04-22 07:17:56 +00:00
Dmitri Hrybenko
701dfbecd2
stdlib: use let-else in maxElement()
...
Swift SVN r27571
2015-04-22 07:06:40 +00:00
Dmitri Hrybenko
76b330519d
stdlib: fix a warning
...
Swift SVN r27570
2015-04-22 07:06:40 +00:00
Dmitri Hrybenko
7bbb0071a3
stdlib: fix a bug in SequenceType.startsWith() introduced in r27567
...
Swift SVN r27569
2015-04-22 07:06:39 +00:00
Chris Lattner
3ec09eec8e
force adopt let/else and the Swift 1.2 if/let extensions in the stdlib a bit, for dogfooding
...
and cleanup.
I changes cases that had a non-trivial "then" body but a trivial else. Most of the cases in
the stdlib have a trivial "then" clause, so I didn't change them.
Swift SVN r27567
2015-04-22 06:24:06 +00:00
Dmitri Hrybenko
69c5a0be3b
stdlib: add a public init to _HeapBufferStorage so that it can be used
...
in tests
Swift SVN r27563
2015-04-22 05:24:20 +00:00
Dmitri Hrybenko
e1adeab0ba
stdlib: move SequenceType and related APIs to a separate file
...
Swift SVN r27560
2015-04-22 04:32:42 +00:00
Dmitri Hrybenko
b68fdd2316
stdlib: reword doc comment for SequenceType.flatMap()
...
Swift SVN r27559
2015-04-22 04:32:41 +00:00
Dmitri Hrybenko
31831c44bb
stdlib: change non-API names to be more descriptive
...
Swift SVN r27558
2015-04-22 04:32:38 +00:00
Joe Groff
86157d533e
Runtime: Reenable metatype casting code when ObjC interop is disabled.
...
Fixes rdar://problem/20583365, and incidentally gets test/Interpreter/layout_reabstraction.swift to work without ObjC interop as well.
Swift SVN r27557
2015-04-22 03:49:12 +00:00
Joe Groff
4c4069d9e9
Runtime: Use 'nullptr' instead of 'nil'.
...
'nil' is only defined if the ObjC runtime is imported.
Swift SVN r27545
2015-04-22 00:45:07 +00:00
Joe Groff
79ee6f21c4
Runtime: Recognize class and @objc existential metatypes as class instances in swift_isClassOrObjCExistential.
...
Fixes rdar://problem/20131232.
Swift SVN r27534
2015-04-21 18:24:10 +00:00
Nadav Rotem
32211041d2
Rename @semantics -> @_semantics.
...
Swift SVN r27533
2015-04-21 17:10:06 +00:00
Devin Coughlin
c9bc783eed
[Runtime] Remove an unneeded dispatch_once() in Availability.mm
...
Following Dmitri's advice, remove an unneeded dispatch_once() and use an
initializer of a function-local static variable instead. NFC.
Swift SVN r27516
2015-04-21 03:41:10 +00:00
Dmitri Hrybenko
526c45b9b0
stdlib: mark free functions on optionals for removal
...
Swift SVN r27511
2015-04-21 00:15:13 +00:00
Dmitri Hrybenko
62403ecc23
stdlib: fix up documentation for new methods
...
Swift SVN r27510
2015-04-21 00:15:03 +00:00
Dave Abrahams
90c7832264
[stdlib] Mirror: store the subjectType
...
We'll need this to properly handle CustomReflectable classes that don't
override customMirror().
Swift SVN r27504
2015-04-20 21:58:27 +00:00
Dave Abrahams
a711b508cc
[stdlib] SuperMirror renaming
...
also changed superclassMirror into a method, since I don't have any
confidence it's going to be O(1).
Swift SVN r27503
2015-04-20 21:58:26 +00:00
Dave Abrahams
702900eb87
[stdlib] Basic support for chained super-mirrors
...
Does not yet inject synthesized mirrors for intermediate classes.
Swift SVN r27502
2015-04-20 21:58:25 +00:00
Dave Abrahams
38f0dce7ba
[stdlib] Synthesized and Suppressed Super-Mirrors
...
Next up: chaining to the mirror for a customized base class
Swift SVN r27501
2015-04-20 21:58:25 +00:00
Dave Abrahams
7cd1429f59
[stdlib] Add _getSuperclass(AnyClass)
...
We'll need this to handle class mirrors properly
Swift SVN r27500
2015-04-20 21:58:24 +00:00
Dave Abrahams
62d958e322
[stdlib] Supply base class mirrors, v2
...
Swift SVN r27499
2015-04-20 21:58:23 +00:00
Dave Abrahams
60ba4d49f7
[stdlib] s/baseClass/superclass/ in Mirrors
...
Swift SVN r27498
2015-04-20 21:58:22 +00:00
Dave Abrahams
e905e7dc31
[stdlib] Supply base class mirrors
...
Swift SVN r27497
2015-04-20 21:58:22 +00:00
Dave Abrahams
0c8a717896
[stdlib] Don't report base as a Mirror child
...
This results in silly infinite recursions. We need an API change to
access the base instance mirror.
Swift SVN r27496
2015-04-20 21:58:21 +00:00
Dave Abrahams
d31a01e2ca
[stdlib] Mirror: s/instance/subject/ where possible
...
"Subject" is a little more specific about the role it plays in the mirror.
Swift SVN r27495
2015-04-20 21:58:20 +00:00
Dave Abrahams
754414c02d
[stdlib] Copy mirrors back to SwiftExperimental
...
So we can do API-breaking work
Swift SVN r27494
2015-04-20 21:58:19 +00:00
Chris Willmore
d4db635e3d
Add object literal syntax and _{Color,Image}LiteralConvertible protocols
...
Add syntax "[#Color(...)#]" for object literals, to be used by
Playgrounds for inline color wells etc. The arguments are forwarded to
the relevant constructor (although we will probably change this soon,
since (colorLiteralRed:... blue:... green:... alpha) is kind of
verbose). Add _ColorLiteralConvertible and _ImageLiteralConvertible
protocols, and link them to the new expressions in the type checker.
CSApply replaces the object literal expressions with a call to the
appropriate protocol witness.
Swift SVN r27479
2015-04-20 12:55:56 +00:00
Dmitri Hrybenko
70828ef4fb
stdlib: stop using _CollectionType to the largest extent possible
...
Swift SVN r27448
2015-04-18 04:25:25 +00:00
Dmitri Hrybenko
883ac4c11f
stdlib: implement a defaulted CollectionType._prext_count() method
...
Swift SVN r27447
2015-04-18 04:25:15 +00:00
Dmitri Hrybenko
3a1410fdec
stdlib: add a default implementation for CollectionType.generate()
...
Swift SVN r27442
2015-04-17 21:55:09 +00:00
Dmitri Hrybenko
9b94063e29
Migrate away from the deprecated String.toInt()
...
Swift SVN r27441
2015-04-17 21:46:21 +00:00
Dmitri Hrybenko
971718b45c
stdlib: mark declarations that we plan to remove as deprecated
...
Swift SVN r27437
2015-04-17 18:15:00 +00:00
Joe Groff
fcf535d682
Runtime: Implement ObjC-free metatype dynamic casts.
...
Swift SVN r27414
2015-04-17 05:30:35 +00:00
Joe Groff
bdbb5a9a5a
Remove now-unnecessary default from exhaustive (Bool, Bool) switch.
...
Swift SVN r27411
2015-04-17 05:30:27 +00:00
Joe Groff
82aa6e720e
stdlib: Implement "_isValidSubscript(_:hoistedIsNativeNoTypeCheckBuffer:)" for ContiguousArrayBuffer.
...
ContiguousArrayBuffer is used as the buffer for Array when ObjC interop is disabled, so even though there's no behavior difference from "_isValidSubscript(_:hoistedIsNativeBuffer:)" for a ContiguousArrayBuffer, we want the interface to be interchangeable with the one for the bridgeable ArrayBuffer.
Swift SVN r27409
2015-04-17 05:30:21 +00:00
Joe Groff
836791691e
stdlib: Don't build ErrorType bridging helpers if there's no ObjC runtime.
...
Swift SVN r27406
2015-04-17 05:30:11 +00:00
Joe Groff
99c7f9defc
stdlib: Remove #if _runtime guard around ExistentialCollection.
...
Expose the next layer of issues we need to fix in the non-ObjC build.
Swift SVN r27405
2015-04-17 05:30:08 +00:00
Dmitri Hrybenko
02d254047b
stdlib: add a hook for dynamic dispatch in CollectionType.find()
...
This hook allows Set.find() to be equally efficient in static and
generic contexts.
This time, with correct tests.
Swift SVN r27404
2015-04-17 05:03:28 +00:00
Dmitri Hrybenko
e94b0f9b40
Revert "stdlib: add a hook for dynamic dispatch in CollectionType.find()"
...
This reverts commit r27402. It broke tests.
Swift SVN r27403
2015-04-17 04:59:29 +00:00
Dmitri Hrybenko
fe53f87dfc
stdlib: add a hook for dynamic dispatch in CollectionType.find()
...
This allows Set.find() to be equally efficient in static and generic
contexts.
Swift SVN r27402
2015-04-17 04:19:49 +00:00
Dmitri Hrybenko
27155549b7
stdlib: annotate Array.map() and Array.filter() with @noescape
...
Now these functions are implemented using protocol extensions, which
are, in turn, implemented with an unsafe hack that casts @noescape away.
rdar://20544096
Swift SVN r27397
2015-04-17 02:17:13 +00:00