Commit Graph

5 Commits

Author SHA1 Message Date
Michael Gottesman
dfe65c20f1 [lit] Change all %target-swift-frontend invocations to verify ownership.
We are already doing this for most of the target-swift-frontend ones. In a
subsequent commit, I am going to remove the redundant ones.

NOTE: On Darwin, I have not enabled it on the %target-swift-frontend mock SDK
commands. I ran into an issue with one of the PrintAsObjC tests that I am still
tracking down. I would rather just get this turned on to prevent further
regressions.

I also updated a few tests that needed some small tweaks to pass
this. Specifically:

1. Some parser tests needed some extra ossa insts to pass the verifier. This
doesn't effect what they actually test.

2. IRGen tests that should never have processed ossa directly. Today, we are
working towards a world where IRGen never processes [ossa] directly. Instead we
lower first. If/when that changes, we should add back in specific [ossa] tests.

3. A singular SILOptimizer definite init test case where the ownership verifier
fails due to a case which DI already flags as illegal (we just crash earlier). I
am going to look into fixing that by putting in errors in the typechecker or in
SILGen (not sure yet). I changed it to use target-swiftc_driver which does not
have ownership verification enabled.
2019-03-12 20:17:20 -07:00
Michael Gottesman
40a09c9c21 Fixup tests for -assume-parsing-unqualified-ownership-sil => [ossa] transition. 2018-12-18 00:49:32 -08:00
Michael Gottesman
be568902f2 [ownership] Always print out ownership argument annotations whether or not -enable-sil-ownership is passed in.
This is how we originally controlled whether or not we printed out ownership
annotations when we printed SIL. Since then, I have changed (a few months ago I
believe) the ownership model eliminator to know how to eliminate these
annotations from the SIL itself. So this hack can be removed.

As an additional benefit, this will let me rename -enable-sil-ownership to
-enable-sil-ownership-verifier. This will I hope eliminate confusion around this
option in the short term while I am preparing to work on semantic sil again.

rdar://42509812
2018-07-24 13:18:37 -07:00
Joe Groff
277608a69b Print and parse SILBoxTypes with a new syntax.
Use a syntax that declares the layout's generic parameters and fields,
followed by the generic arguments to apply to the layout:

  { var Int, let String } // A concrete box layout with a mutable Int
                          // and immutable String field
  <T, U> { var T, let U } <Int, String> // A generic box layout,
                                        // applied to Int and String
                                        // arguments
2016-12-02 13:44:22 -08:00
Joe Groff
b4041a5b57 SIL: Restrict partial_apply when -disable-sil-partial-apply is enabled.
Allow it only to have one context parameter, whose ownership convention matches the convention of the resulting thick function, effectively limiting it to binding a closure invocation function to its context.
2016-10-10 11:25:57 -07:00