These mirrors are the default mirrors that get used for all objective-C
object, including some that aren't defined in Foundation:
import Dispatch
println(dispatch_get_global_queue(0,0))
This example isn't fixed yet, because we need to pull all the string
bridging goop out of Foundation and into the core standard library.
Swift SVN r25012
This change allows us to drop an egregious table-of-function-pointers
hack in favor of a much cleaner hack using SwiftShims. It also allows
us to move the ObjC mirrors out of Foundation in an upcoming commit.
Swift SVN r25011
We're going to replace StdlibUnittest's use of ContiguousArray with
_UnitTestArray so that we can work on (and potentially break)
_ContiguousArray and still get useful test results. When refactoring is
complete, we can optionally replace StdlibUnittest's use of
_UnitTestArray with ContiguousArray, or move the decoupled component
into the StdlibUnittest module.
Swift SVN r22874
We're going to use it for Array internals. When we do, it should be
expected to cause a performance hit on arrays of value types until
rdar://18125016 is handled.
Swift SVN r22784
This reverts r22541. It turns out that because of the type-punning we
need in order to handle the canonical empty array buffer in Array<Int>
and Array<SomeClass>, calls through methods that could be
dynamically-dispatched (i.e. methods of classes) can't be used to access
an array buffer. So, for arrays, we need to keep the HeapBuffer
strategy wherein a struct manager object does all the address
calculations.
ManagedBuffer is still a useful tool for users though, and it fills the
role that HeapBuffer was intended to serve for them better than
HeapBuffer itself does, because it is simpler and more type-safe.
Swift SVN r22573
This change breaks things and will probably continue breaking them
until the standard library and code generation is more functional
on linux.
Leaving in a TODO to turn it back on later.
Swift SVN r22572
This patch adds a compiler entry point to the standard library that checks
whether the running OS version is greater than or equal to a given version
triple. The idea is that #os(...) will get SILGen'd into a call to this
function.
The standard library function calls a runtime function to actually get the OS
version. This runtime function uses -[NSProcessInfo operatingSystemVersion] when
possible, otherwise it loads the SystemVersion plist. When running under the
simulator, we use an environmental variable set by the simulator to look up the
version for the simulated OS and not the host OS.
At the moment, there is no caching for version info. I will add this in a later
patch.
Swift SVN r22303
Expose any, all on Array and all the Lazy sequence adapters. Make the
'contains' algorithm that takes a predecate unavailable in favor of
'any', which does the same thing.
Fixes <rdar://problem/18190149> [algorithm] `contains` syntax is ambiguous
Swift SVN r21810
the type
Printing Float32 with %0.15g not only wastes screen space, but also causes
confusion for users, and pretends that a Float32 has more precision than it
actually does.
rdar://18043123
Swift SVN r21435
This function mixes the bits in the hash value, which improves Dictionary
performance for keys with bad hashes.
PrecommitBenchmark changes with greater than 7% difference:
``````````Dictionary2`,```1456.00`,```1508.00`,```1502.00`,````624.00`,````607.00`,````592.00`,`864.00`,``145.9%
``````````Dictionary3`,```1379.00`,```1439.00`,```1408.00`,````585.00`,````567.00`,````552.00`,`827.00`,``149.8%
````````````Histogram`,````850.00`,````849.00`,````851.00`,```1053.00`,```1049.00`,```1048.00`,`199.00`,``-19.0%
````````````````Prims`,```1999.00`,```2005.00`,```2018.00`,```1734.00`,```1689.00`,```1701.00`,`310.00`,```18.4%
``````````StrSplitter`,```2365.00`,```2334.00`,```2316.00`,```1979.00`,```1997.00`,```2000.00`,`337.00`,```17.0%
```````````````TwoSum`,```1551.00`,```1568.00`,```1556.00`,```1771.00`,```1741.00`,```1716.00`,`165.00`,```-9.6%
Regressions are in benchmarks that use `Int` as dictionary key: we are just
doing more work than previously (hashing an `Int` was an identity function).
rdar://17962402
Swift SVN r21142
This file is really about array casting, and not (necessarily) bridging.
Bridging may be involved in some array casts, but is not involved in all
of them.
Swift SVN r20690
This allows 0.0..<10.3 and 0.1...4.4 to work properly in pattern
matching.
Fixes <rdar://problem/12016900> (#Seed 4: add a "contains" method to the
range types) by making "contains" available on Interval
Addresses <rdar://problem/16254937> (#Seed 4: Ranges with negative
strides are broken) by making the formation of an invalid Interval a
runtime error.
Fixes <rdar://problem/16304317> (Range<T> has limited awesomeness: it is
restricted to types that conform to ForwardIndex)
Fixes <rdar://problem/16736924> (#Seed 4: Enable range inclusion pattern
matching for all types that conform to Equatable and Comparable)
Addresses <rdar://problem/16846325> (#Seed 4: Introduce index range) by
distinguishing Range (which operates on indices) from Interval
Fixes <rdar://problem/17051263> (Pattern-matching a Double range with an
infinite endpoint triggers an assertion failure)
Fixes <rdar://problem/17051271> (#Seed 4: Pattern-matching Double ranges
excludes fractional values)
Addresses <rdar://problem/17171420> (Separate types for closed and
half-open ranges)
Swift SVN r19900
And make RandomAccessIndex refine it.
* had to XFAIL
test/Prototypes/TextFormatting.swift (<rdar://problem/17619178>)
* Had to compromise on the name of Strideable's associated
type (<rdar://problem/17619038>)
Swift SVN r19785
This commit removes Mirrors for RangeGenerators, since Dave and I discussed that these won't be necessary in practice
Also, it removes the Mirrors for Range types from Range.swift.gyb, and instead adds a new RangeMirrors.swift.gyb used to generate range types Mirrors
Swift SVN r19543
Using ..< and ... on RandomAccessIndex endpoints now produces a distinct
RandomAccessRange type that can have zero-based indexing, validation at
creation, efficient strides (the other Range should probably lose its
stride capability), and all kinds of other goodness. This is the first
step in solving our cluster of outstanding Range-related issues.
Swift SVN r19497
COMPILE_FLAGS is currently used for two purposes:
- For any target library, add the appropriate Swift optimization flags. This eliminates the add_swift_optimization_flags boilerplate and makes these flags work for all library variants
- For the runtime, pass the appropriate define down when SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS is set, so that all library variants get this setting.
Swift SVN r19444
algorithm
The implementation uses a specialized trie that has not been tuned to the table
data. I tried guessing parameter values that should work well, but did not do
any performance measurements.
There is no efficient way to initialize arrays with static data in Swift. The
required tables are being generated as C++ code in the runtime library.
rdar://16013860
Swift SVN r19340
This one shows the unfortunate consequence that we need
Lazy[Forward|Bidirectional|RandomAccess]Collection. There's gonna be a
whole lotta gyb'bing going on...
Swift SVN r19316