Neither order is particularly great yet, but getting them in sync will help us keep SIL.rst coverage up as we add/remove instructions in the future.
Swift SVN r6457
Add a convenience SILModule::getTypeLoweringInfo forwarder, and move the emitRetainRValue and emitReleaseRValue helpers from SILGenFunction to SILBuilder so they're more readily available to non-SILGen passes. Add an emitDestroyAddress helper that emits nothing, destroy_addr, or load + release based on the value semantics of the referenced type.
Swift SVN r6431
SIL passes need to have the value semantics information in TypeLoweringInfo available by SILType. Refactor getTypeLoweringInfo into separate "derive the SILType from a Swift type" and "determine the value semantics for a SILType" stages, and index the resulting TypeLoweringInfo by both (CanType, uncurryLevel) and SILType.
Swift SVN r6429
As per Chris's suggestion (review of r6152), further refactored SILLocation not to derive from PointerUnion3 but to include it as a member.
In addition, added some template magic to make sure we don't have to chain dyn_casts, which I suspect will be/is happening a lot with SILLocation:
Ex:
- if (auto E = Func.dyn_cast<Expr*>()) {
- if (const FuncExpr *FE = dyn_cast<FuncExpr>(E))
- return SILLocation(FE->getBody())
+ if (const FuncExpr *FE = Func.getAs<FuncExpr>())
+ return SILLocation(FE->getBody());
Swift SVN r6283
In the resilience model for default arguments, the presence of a
default argument is API, but its specific value is not. Thus, the
actual default argument values can evolve over time. To implement
this, for each default argument, we emit a function that
takes no arguments and produces the default value for that
argument. The caller will then call that function to form the default
argument.
This commit emits these functions for each default argument, even
though they are not currently being called. This is part of
<rdar://problem/11561185>.
We'll probably want a different calling convention for these functions
that preserves all registers, since they will often end up being very
trivial functions.
Swift SVN r6260
UnreachableInst's constructor didn't take a SILLocation. Oops. Fix that, and associate Unreachables emitted due to failed switch coverage with the switch. For missing-return Unreachables, there isn't yet readily available SILLocation info to attach to them, but Anna will fix that soon.
Swift SVN r6132
As clause matrix specialization exposes columns with variable bindings, bind all of the variables in each column to a new box for the variables in that column. (Since only one row out of the matrix ever ends up getting executed, we can share one box for the entire column.) Set up a scope hierarchy following that of the specialized clause matrices, and associate each case with the scope it needs to see all the variables of its fully-destructured pattern clause. Remove our ad-hoc hack for binding ExprPattern implicit variables, and bind them to the column's box too.
Swift SVN r6127
Guard against StringRef-uncleanness in APFloat (e.g. rdar://14323230) and hopefully stop the intermittent buildbot failures in some Interpreter tests.
Swift SVN r5951
Map BOOL parameters, return types, and properties to swift.Bool in the Clang importer like we map NSString to swift.String. Generalize SIL's handling of type bridging to accommodate Bool bridging in addition to String bridging. Add convertObjCBoolToBool and v.v. entry points for the compiler to use to insert bridging conversions between the two types. Implements <rdar://problem/14271667>.
Swift SVN r5819