Add a set of _preconditionOptionalHasValue intrinsics that merely test that an optional has a case. Emit an lvalue ForceValueExpr as a physical lvalue, first asserting the precondition then projecting out the Some payload.
Swift SVN r20188
We've decided resilience is wrong for Swift given current constraints;
see rdar://problem/11940897 for more detail.
This reverts commit r20052
Swift SVN r20127
It wasn't properly handling the cases where the bound was in the
opposite direction from the amount, when advancing random access
indices.
Swift SVN r20123
This will allow more error checking, resilient slicing, and occasionally
other useful capabilities.
Step 1 of <rdar://problem/11940897>
Swift SVN r20036
Marking these generic functions as transparent results in our not
emitting diagnostics for unreachable code if these functions are the
only code in a block and inlining generic code is enabled (due to
<rdar://problem/17687851>).
I don't believe other diagnostics benefit in any way from having these
marked as @transparent, and removing @transparent actually improved
Ackerman at -O3 by 15%.
Swift SVN r19996
enforce its own little constraints. The type checker isn't using it for
anything, and it is just clutter.
This resolves <rdar://problem/16656024> Remove @assignment from operator implementations
Swift SVN r19960
modifiers and with the func implementations of the operators. This resolves the rest of:
<rdar://problem/17527000> change operator declarations from "operator prefix" to "prefix operator" & make operator a keyword
Swift SVN r19931
eliminating the @'s from them when used on func's. This is progress towards
<rdar://problem/17527000> change operator declarations from "operator prefix" to "prefix operator" & make operator a keyword
This also consolidates rejection of custom operator definitions into one
place and makes it consistent, and adds postfix "?" to the list of rejected
operators.
This also changes the demangler to demangle weak/inout/postfix and related things
without the @.
Swift SVN r19929
When the Index type of a Range is Comparable, we can reject invalid
ranges at their formation.
It might be worth injecting some checkability concept into ForwardIndex
so that even in generic contexts where Comparability is unknown, we can
do this same check in the Range constructor.
Also, remove pattern matching support for Ranges of RandomAccessIndex,
as that is covered by Interval.
Fixes <rdar://problem/16254937> (#Seed 4: Ranges with negative strides
are broken) to the extent possible (it's still possible to form an
invalid Range of indices that are not Comparable)
Fixes <rdar://problem/17164391> (Swift: Using ranges in for in for
counting down, causes the loop to go inifinely)
Fixes <rdar://problem/17580871> (Swift: Closed range with negative
endpoint excludes that endpoint)
Swift SVN r19903
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
This only tackles the protocol case (<rdar://problem/17510790>); it
does not yet generalize to an arbitrary "class" requirement on either
existentials or generics.
Swift SVN r19896
Mechanically add "Type" to the end of any protocol names that don't end
in "Type," "ible," or "able." Also, drop "Type" from the end of any
associated type names, except for those of the *LiteralConvertible
protocols.
There are obvious improvements to make in some of these names, which can
be handled with separate commits.
Fixes <rdar://problem/17165920> Protocols `Integer` etc should get
uglier names.
Swift SVN r19883
native Dictionary storage and adopt it if KeyType and ValueType match
exactly
This was the last missing piece to allow Dictionary to round-trip
thorough objc entrypoints of Swift methods in O(1).
Fixes rdar://17556319, partially fixes rdar://17010353
Swift SVN r19873
types to NSDictionary, perform bridging operation in O(1), and defer
bridging of the contents until the NSDictionary is accessed
There is no cache for bridged keys and values; the Swift NSDictionary
will return values with different pointer values when a given key is
repeatedly accessed.
Part of rdar://17556319
Does not fix the O(N) performance of objc thunks, because Dictionary is
not recognizing its own native storage when bridging from Objective-C.
This tracked by rdar://17010353
Swift SVN r19853
1) Add an ObjCObject disposition that tells us this Mirror is reflecting upon an ObjC-imported type
2) Change the default summary of _ClassMirror and _StructMirror to be the mangled typename, with no children count
Swift SVN r19817