Playgrounds want to be able to represent numbers different from strings, so provide different tags for types that represent numbers distinct from strings. Set up the Int and Double mirrors to return quick look objects of the appropriate cases, and hook up the magic ObjC mirror to do the same for NSNumbers. <rdar://problem/16360758>
Swift SVN r15219
Only the bits that actually need to grovel metadata really need to be written in C++, so define away hopefully most of the potential for memory safety or corruption bugs from screwing up calling convention matchups by moving most of the magic mirror implementations into pure Swift.
Swift SVN r15180
We'll need to apply the same tricks we're using for Array to Dictionary
and String, so prepare to generate base classes for those buffers as
well. Actually generate and use the one for Dictionary, but don't
actually bridge it yet.
Swift SVN r15167
We want the metadata of the ObjC class, not the opaque Builtin.ObjCPointer metadata. This allows the Any to actually be downcast to an expected type on the client side.
Swift SVN r15009
Now that we can read definitions directly from "C" headers, stop trying
to maintain a mirror of the HeapObject struct in Swift code in the
standard library.
Swift SVN r14982
Add 'Sound', 'Color', and 'BezierPath', as requested by Enrico, as well as a '_Raw' case that can be used for internal experimentation.
Swift SVN r14978
Turns out CMake's PRE_BUILD mode for custom commands doesn't work with the
Ninja or Makefile generators (not sure about Xcode). Just do it as part of
an earlier target instead.
Swift SVN r14968
[This time, shims.h doesn't depend even on a system header; hopefully the
'bot will be happy enough with that until someone fixes the build system
to allow "#include <stdint.h>" to appear in shims.h]
Now we can essentially send an NSRange instance in a message to a
CocoaArray without having loaded foundation.
Swift SVN r14957
malloc_size() also is used to determine which zone owns a given allocation.
<rdar://problem/16293435> malloc_size is getting called recursively
Swift SVN r14928
Implicit conversions to and from an unsigned long long enum class give us the calling convention we want for swift_allocBox without totally destroying the API for C callers.
Swift SVN r14919
This broke systems where it isn't appropriate to clear the module cache.
The build script already does this when you do a full build; for other
cases, we should just deal with it. (You can still specify a custom
MODULE_CACHE_PATH to make it easier to delete, rather than relying on the
system one.)
This reverts commit r14364.
<rdar://problem/16232176>
Swift SVN r14872
Before this commit, RandomAccessIndex was a refinement of
NumericOperations, which forced it to support inappropriate operations
such as multiplication. Many obvious random-access index types can't
support multiplication (e.g. a StridedIndex adapter, which moves its
underlying index by N positions for each increment).
Along the way:
* the addition and subtraction operations on RandomAccessIndex were
renamed to advancedBy and distanceTo, which prevents nasty ambiguities
when a type conforms to both RandomAccessIndex and Integer, and allows
Index DistanceTypes to actually be signed integers even when the Index
is unsigned.
* Before this commit, using internal interfaces, it was possible to
request static checking without also getting dynamic checks when
static checking is impossible. Now the relationship between static
and dynamic checking is built into the core protocols.
* NumericOperations.swift was moved into IntegerArithmetic.swift.gyb,
correcting missing operators by generating them programmatically and
in preparation for renaming the protocol to something more appropriate
Fixes
<rdar://problem/16246927> RandomAccessIndex is over-constrained
and possibly:
<rdar://problem/15605729> Make all operators generic over
protocols (in particular, get NumericOperations done)
Swift SVN r14854
Playgrounds want to present aggregate-like values with fixed children, such as structs and classes, differently from container-like values with variable amounts of children, like arrays and dictionaries, so add a property to Mirror that describes the disposition of the value being reflected.
Swift SVN r14827
To support layering improvements, add an (optionally built) "essential
core" library containing the minimum set of files required just to link
successfully. Right now all those object files are linked again into
swift_stdlib_core; it would probably be better to link the essential
core into the core, but my CMake/Swift Driver fu is not strong enough
and this will at least help during development.
Along the way, removed the obsolete SwiftStdlibSources.txt file, as we
only have to support one build system now.
Swift SVN r14792
It's dead, Jim. Also remove 'ClassNameable' since we don't use it for anything.
Reapply r14647 now that John fixed the serialization issue that scuttled it last time.
Swift SVN r14722
In response to feedback from the Xcode team, change the 'IDERepresentable' type from a protocol into an enum with a limited set of tags, starting with 'Text' and 'Image' for now. In the ObjC mirror, if the ObjC object has a -debugQuickLookObject method, use it to get an object we can try to map to the enum.
Swift SVN r14632