Commit Graph

11 Commits

Author SHA1 Message Date
Pavel Yaskevich
6519d99736 [Mangling/ABI] NFC: Fix SILGen tests to reflect label mangling changes 2017-12-18 15:44:24 -08:00
Slava Pestov
2a0cb060f8 SILGen: Look up the callee method after evaluating arguments 2017-11-08 01:31:55 -08:00
Alex Hoppen
1c7e289b96 [Mangling] Adjust subscript mangling to not include "subscript"
Change the mangling of accessors to have a variable or subscript node
as their only child node, while subscript nodes no longer contain a decl
name.
2017-09-10 19:44:07 +02:00
Michael Gottesman
862b20426a [silgen] Update another 32 SILGen tests for running with the ownership verifier enabled.
Now ~45% of the SILGen tests run with the ownership verifier enabled.

rdar://33358110
2017-08-21 21:52:17 -07:00
Michael Gottesman
1e3b2c18e2 Exhaustive tests for throwing initializers where the throw happens at various points of the init sequence.
This commit adds a bunch of missing tests for init sequences. The specific
places we stick throws are:

1. Before Delegating.
2. During Delegation Argument Emission.
3. During Delegation Call.
4. After Delegation.

The tests ensure that we are properly treating self as a move only type until
delegation is complete and that we do not crash during such initializations.

rdar://32539006
2017-06-19 20:45:26 -07:00
Michael Gottesman
cd55f46626 Use a cast instead of trying to rely on higher level APIs.
I missed this problem due to a missing test case in initializers.swift. In a
subsequent commit, I am going to add the rest of the missing cases with some
FileCheck tests for some of them. This is to ensure that the commit is easy to
review.

rdar://32539006
2017-06-19 19:37:23 -07:00
Andrew Trick
fa70d90b5e [Exclusivity] Update SILGen tests for dynamic access markers. 2017-05-31 21:43:00 -07:00
Michael Gottesman
aa76c2a5e6 [silgen] (mark_uninitialized (project_box (alloc_box))) -> (project_box (mark_uninitialized (alloc_box)))
I put in a simple fixup pass (MarkUninitializedFixup) for staging purposes. I
don't expect it to be in tree long. I just did not feel comfortable fixing up in
1 commit all of the passes up to DI.

rdar://31521023
2017-04-17 17:45:54 -07:00
Michael Gottesman
4dacf68848 [silgen] Make sure that we do not disable ownership along failure paths when performing select enum checks.
What is happening here is that we are performing a select_enum check and then
not emitting the cleanup on the path where we know that our optional value is
null. To express such an operation in semantic sil, one should use a switch_enum
instead. Thus we must insert the destroy_value so that we know that the optional
value is balanced along all paths.

rdar://31145255
2017-03-26 10:47:12 -07:00
Erik Eckstein
c4a11f4c92 tests: remove the now unused option -new-mangling-for-tests 2017-03-22 11:28:43 -07:00
Michael Gottesman
784d5d16fc [silgen] Change emitClassConstructorInitializer to use ownership and make calling designated/chaining initializes use proper ownership.
rdar://29791263
2017-02-23 08:48:58 -08:00