Commit Graph

2202 Commits

Author SHA1 Message Date
swift-ci
eb6f0906c2 Merge remote-tracking branch 'origin/master' into master-next 2017-04-28 12:08:34 -07:00
Roman Levenstein
1731250dac [sil-open-archetypes-tracker] Add type dependent operands to more instructions
The following instructions were enhanced with type dependent operands:
- convert_function
- pointer_to_thin_function
- upcast_inst
- thin_to_thick_function

Fixes rdar://31879356
2017-04-28 09:35:06 -07:00
swift-ci
cdde06ac25 Merge remote-tracking branch 'origin/master' into master-next 2017-04-27 15:56:02 -07:00
swift-ci
962c71a2f1 Merge pull request #9056 from atrick/access 2017-04-26 18:10:28 -07:00
Andrew Trick
087a1a956e Fix SIL serialization for access markers. 2017-04-26 17:11:30 -07:00
Michael Gottesman
e11daa8ddf [upstream-update] Do not use succ_iterator in GraphTraits. Use succblock_iterator instead.
rdar://31790907
2017-04-26 16:50:57 -07:00
swift-ci
b853412307 Merge pull request #9037 from gottesmm/small_succ_updates 2017-04-26 14:03:15 -07:00
Michael Gottesman
913920c93b [sil] Rename SILSuccessorIterator -> SILSuccessor::pred_iterator.
This iterator is not actually a SILSuccessorIterator since it is not iterating
over the "successors" of a block. Instead it is used to given the head of a CFG
edge, iterate over the CFG edge's predecessors using the double linked list
stored inside SILSuccessor.

This rename/refactor ties SILSuccessor closer to SILSuccessorIterator and makes
it clear what we are actually iterating over.
2017-04-26 13:32:59 -07:00
Michael Gottesman
3ab6604a67 [gardening] Add more comprehensive comments to SILSuccessor.h.
This just makes it clearer what this class really does and also makes it clear
that this is really representing a CFGEdge more than a specific successor. I may
rename it to SILCFGEdge at some point to make the name match its usage.
2017-04-26 13:15:51 -07:00
John McCall
338825e73d Fix the emission of r-value pointer conversions to delay the
conversions and extend lifetimes over the call.

Apply this logic to string-to-pointer conversions as well as
array-to-pointer conversions.

Fix the AST verifier to not blow up on optional pointer conversions,
and make sure we SILGen them correctly.  There's still an AST bug
here, but I'll fix that in a follow-up patch.
2017-04-26 14:15:44 -04:00
practicalswift
ab5aaeb359 Merge pull request #9001 from practicalswift/gardening-20170425
[gardening] Unused variables. Unused diagnostics. Namespace comments. Typos.
2017-04-26 09:28:24 +02:00
Roman Levenstein
d08e075f9c [sil-cloner] Be careful when during the cloning process one instruction is mapped to multiple new instructions
Fixes a long-standing bug in the SIL cloner.
2017-04-25 16:32:55 -07:00
Roman Levenstein
af2a59622e [sil-generic-specializer] Fix a bug related to cloning of self-referring generic closures
Fixes rdar://31776399
2017-04-25 16:31:42 -07:00
practicalswift
ff827e0455 [gardening] Fix recently introduced typos 2017-04-25 21:03:44 +02:00
Slava Pestov
0290c2d5d8 AST: Make GenericSignature and GenericEnvironment SubstitutionMaps interchangable
SubstitutionMap::lookupConformance() would map archetypes out
of context to compute a conformance path. Do the same thing
in SubstitutionMap::lookupSubstitution().

The DenseMap of replacement types in a SubstitutionMap now
always has GenericTypeParamTypes as keys.

This simplifies some code and brings us one step closer to
a more efficient representation of SubstitutionMaps.
2017-04-24 14:12:36 -07:00
Roman Levenstein
202de40f05 [sil-opened-archetype-tracker] Improve tracking of archetypes in SILBuilder
Fixes rdar://problem/31749245
2017-04-24 08:50:55 -07:00
swift-ci
cce9eb4f8d Merge remote-tracking branch 'origin/master' into master-next 2017-04-23 01:48:58 -07:00
John McCall
7b7f23ab33 Merge pull request #8945 from rjmccall/unpaired-accesses
Add unpaired access marker instructions for materializeForSet
2017-04-23 04:35:00 -04:00
swift-ci
a0056b34ff Merge remote-tracking branch 'origin/master' into master-next 2017-04-22 21:48:40 -07:00
Roman Levenstein
a60e037c48 Revert "[sil-opened-archetype-tracker] Improve tracking of archetypes in SILBuilder" 2017-04-22 20:41:31 -07:00
John McCall
978f0e05fe Add unpaired access marker instructions and use them to implement
dynamic access tracking in materializeForSet.
2017-04-22 22:52:13 -04:00
swift-ci
3b9c84a30c Merge remote-tracking branch 'origin/master' into master-next 2017-04-22 11:48:31 -07:00
Roman Levenstein
33c8bde859 [sil-opened-archetype-tracker] Improve tracking of archetypes in SILBuilder
Fixes rdar://problem/31749245
2017-04-22 10:03:37 -07:00
swift-ci
4ef7b46971 Merge remote-tracking branch 'origin/master' into master-next 2017-04-21 18:08:32 -07:00
Joe Groff
3d178be169 Merge pull request #8875 from jckarter/keypaths
Keypaths
2017-04-21 17:51:17 -07:00
swift-ci
94a4e5f9e7 Merge remote-tracking branch 'origin/master' into master-next 2017-04-21 17:48:32 -07:00
Joe Groff
d5cdf658da KeyPaths: Generate _kvcKeyPathString for ObjC-compatible keypaths. 2017-04-21 16:56:17 -07:00
Roman Levenstein
ae5effbf2f [sil-opened-archetypes-tracker] Add helper methods for dumping the state 2017-04-21 16:07:36 -07:00
swift-ci
6225602e62 Merge remote-tracking branch 'origin/master' into master-next 2017-04-20 11:28:53 -07:00
Erik Eckstein
d4db9b8099 SILPrinter: make the printing of debug info optional.
With the option -sil-print-debuginfo the printing of debug locations and scopes can be enabled.

I made the default for the option “false”, because in 99% of the time I don’t need the debug info in the printed SIL and I prefer better readability.
2017-04-20 09:18:08 -07:00
swift-ci
faa74d7167 Merge remote-tracking branch 'origin/master' into master-next 2017-04-20 01:48:41 -07:00
Slava Pestov
f4b91cd118 AST: Remove unused 'resolver' argument from TypeBase::getSuperclass() 2017-04-20 00:37:38 -07:00
Joe Groff
595e0e4ede Merge branch 'master' into keypaths 2017-04-19 18:38:24 -07:00
Joe Groff
a6cd471c2b IRGen/stdlib: Instantiate non-generic computed key path components. 2017-04-18 21:51:12 -07:00
swift-ci
4a9a70f495 Merge remote-tracking branch 'origin/master' into master-next 2017-04-18 14:08:30 -07:00
practicalswift
a41a501c56 Merge pull request #8835 from practicalswift/gardening-20170418
[gardening] Fix URLs. Fix spacing. Remove unused methods. Fix headers.
2017-04-18 22:59:00 +02:00
swift-ci
ae1eb1197c Merge remote-tracking branch 'origin/master' into master-next 2017-04-18 11:08:33 -07:00
John McCall
7a4c761426 Merge pull request #8821 from rjmccall/dynamic-enforcement-vol-1
Basic dynamic enforcement of exclusivity
2017-04-18 13:57:54 -04:00
practicalswift
a029589093 [gardening] Use consistent headers 2017-04-18 19:51:08 +02:00
swift-ci
3098fc666a Merge remote-tracking branch 'origin/master' into master-next 2017-04-18 10:28:41 -07:00
practicalswift
7eb7d5b109 [gardening] Fix 100 typos. 2017-04-18 17:01:42 +02:00
swift-ci
6d2515053f Merge remote-tracking branch 'origin/master' into master-next 2017-04-17 19:48:31 -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
John McCall
82c2d11632 Allow dynamic access markers in non-raw SIL. 2017-04-17 17:16:13 -04:00
Joe Groff
ee66ff35c5 SILGen: Lower computed property key path components. 2017-04-14 17:13:38 -07:00
swift-ci
c2966bc00d Merge remote-tracking branch 'origin/master' into master-next 2017-04-14 13:48:32 -07:00
Joe Groff
9ade487689 SIL: Allow computed components in KeyPathInst.
A computed component needs:

- A stable identifier for equality checking. This can be either a static function reference for concrete property implementations, or a reference into a vtable or witness table for a dynamically dispatched property. This should correspond to a public ABI interface for public things.
- Getter and setter (TODO: and materializeForSet) references. These might be thunks to reach the necessary abstraction level for the keypath implementation, so they can't be used as stable identifiers directly.
2017-04-13 14:18:28 -07:00
Huon Wilson
b59f95418c [SIL] Extract ClassVisibility from SILFunction to SubclassScope in SILLinkage. 2017-04-13 14:17:29 -07:00
Joe Groff
d6ced9d9e4 SIL: Rework KeyPathInst to accommodate computed components.
- Separate out a uniquable KeyPathPattern that describes the context-free shape of the key path, with generic parameters and (eventually) subscript index slots factored out.
- Add component kinds for gettable and settable properties.
2017-04-12 20:09:17 -07:00
swift-ci
7e4b533fa4 Merge remote-tracking branch 'origin/master' into master-next 2017-04-12 07:48:32 -07:00