Commit Graph

17988 Commits

Author SHA1 Message Date
Ted Kremenek
157133db50 Pass -swift-version X for %target-swift-frontend 2017-04-27 23:13:57 -07:00
Robert Widmann
39494b2ba2 Rearrange test code for exhaustiveness 2017-04-28 02:06:39 -04:00
Doug Gregor
9ebc4caa41 [Type checker] Warn about unavailable witnesses used to satisfy a requirement. 2017-04-27 22:40:21 -07:00
Nathan Hawes
8ad6aa4e0d [migrator] Add pass for API type changes
This handles optionality changes and type rewrites in function param and return types and constructor param and failability types.
Resolves rdar://problem/31766010
2017-04-27 22:19:52 -07:00
swift-ci
8a303cec3f Merge remote-tracking branch 'origin/master' into master-next 2017-04-27 21:48:31 -07:00
Slava Pestov
0ad6f73f60 Merge pull request #9090 from slavapestov/enable-subclass-existentials
Enable subclass existentials
2017-04-27 21:33:03 -07:00
swift-ci
7cf8e2d6c3 Merge remote-tracking branch 'origin/master' into master-next 2017-04-27 21:28:31 -07:00
swift-ci
97a9bfa8a2 Merge pull request #9082 from devincoughlin/test-global-access-traps 2017-04-27 21:19:42 -07:00
Slava Pestov
e3b68e7bdd Remove -enable-experimental-subclass-existentials staging flag 2017-04-27 20:46:37 -07:00
Slava Pestov
1bce1beadb XFAIL the subclass_existentials test in check-swift-optimize mode
There's an existing optimizer bug that is now exposed
involving function conversions. It does not appear
related to my changes.

I filed <rdar://problem/31879356> to track the issue.
2017-04-27 20:46:37 -07:00
Slava Pestov
1615915780 Runtime: Dynamic casts to subclass existentials 2017-04-27 20:46:36 -07:00
Slava Pestov
e032d916f9 Runtime: Update _swift_buildDemanglingForMetadata() for subclass existentials 2017-04-27 20:46:36 -07:00
Dave Abrahams
1cfce45147 [stdlib] UnicodeDecoders: generalization preparing for UTF16 2017-04-27 20:44:45 -07:00
swift-ci
b68344e055 Merge remote-tracking branch 'origin/master' into master-next 2017-04-27 19:48:31 -07:00
Jordan Rose
06c3c99cbc Merge pull request #8933 from jrose-apple/check-the-type-before-you-decl
[Serialization] Drop decls whose types can't be deserialized.
2017-04-27 19:38:52 -07:00
swift-ci
3efc87e41e Merge remote-tracking branch 'origin/master' into master-next 2017-04-27 19:08:31 -07:00
John Holdsworth
fea17f22aa [Parse] Add support for multiline strings inside interpolations
Adds support for multiline string literals to appear inside of string interpolations. Tests added.
2017-04-27 19:02:23 -07:00
swift-ci
acdb6fdfaa Merge remote-tracking branch 'origin/master' into master-next 2017-04-27 18:48:32 -07:00
swift-ci
5254db43b1 Merge pull request #9089 from jrose-apple/fix-mangled-name 2017-04-27 18:34:04 -07:00
Jordan Rose
5344d16039 [Serialization] Make sure grandchild overrides can be dropped too.
If a base method's not available, we already drop the overridding
method. Make sure this works even when the base method is itself
an override that failed to load.
2017-04-27 18:30:35 -07:00
Jordan Rose
db1fc95b69 [Serialization] Drop subscripts and initializers with problem types.
Finishes up the "big four" non-type decl kinds. Unfortunately,
indiscriminately dropping members from a class affects the layout
of its vtable. That issue is tracked by rdar://problem/31878396.
2017-04-27 18:30:34 -07:00
Jordan Rose
59a2545a7f [Serialization] Drop functions whose types can't be imported.
This doesn't handle generic functions with problems in their
requirements, but it's a step.
2017-04-27 18:30:34 -07:00
Jordan Rose
3ee8e843e7 [Serialization] Propagate errors through compound types.
If there's an error deserializing part of a type, just propagate it
out. Also add support for bound generic types. This isn't meant to be
full coverage of possible failures, just ones that are likely to come
up through the C/ObjC importer.

Still to do:
- Generic function types (only show up on functions)
- Unbound generic types (only show up on typealiases, which I may not
  even tackle)
2017-04-27 18:30:34 -07:00
Jordan Rose
1168cacf4f [Serialization] Drop decls whose types can't be deserialized.
Proof-of-concept for the above. This shouldn't be common---renames are
far more likely, and those we can track---but occurs when the
swift_wrapper attribute (the implementation of NS_STRING_ENUM) is
active in Swift 4 but not in Swift 3.

Note that this only checks the canonical interface type of the
declaration, because the non-canonical type may contain references to
the declaration's generic parameters.
2017-04-27 18:30:34 -07:00
swift-ci
c66c058593 Merge remote-tracking branch 'origin/master' into master-next 2017-04-27 18:09:30 -07:00
swift-ci
8582b41527 Merge pull request #9087 from apple/stateful-unicode-decoding 2017-04-27 17:59:27 -07:00
Slava Pestov
306e9a3772 Merge pull request #9085 from slavapestov/subclass-existential-executable-tests
Subclass existential executable tests
2017-04-27 17:56:19 -07:00
Jordan Rose
903c8c15f2 [test] Fix mangled name for renamed test. 2017-04-27 17:48:47 -07:00
Dave Abrahams
4e802e2f51 [stdlib] UnicodeDecoders: A *little* cacheing builds character
Speeds up the unicode scalar view around 20%.  Now we are reasonably confident
we don't need a more sophisticated API for decoding than the one we've got, and
can move toward integration.
2017-04-27 16:48:39 -07:00
swift-ci
15e06f2c59 Merge remote-tracking branch 'origin/master' into master-next 2017-04-27 16:48:31 -07:00
Xi Ge
14781598cb [Migrator] Handle getter/setter to property access migration. rdar://31766311 (#9083) 2017-04-27 16:33:57 -07:00
Slava Pestov
77b760d500 Add some more tests for subclass existentials
- Test member access on metatypes
- SILGen tests for properties and subscripts
- End-to-end executable tests
2017-04-27 16:08:33 -07:00
swift-ci
cdde06ac25 Merge remote-tracking branch 'origin/master' into master-next 2017-04-27 15:56:02 -07:00
Devin Coughlin
73aabd73f7 [Exclusivity] Fix insertion/remove in AccessSet in runtime.
And add some basic tests for trapping on accesses to globals.
2017-04-27 15:38:07 -07:00
Erik Eckstein
c343ab6907 ArrayElementValuePropagation: fix a wrong substituted function type for the generated reserveCapacity function call 2017-04-27 14:50:58 -07:00
swift-ci
2e6bdbc1fa Merge pull request #9078 from apple/stateful-unicode-decoding 2017-04-27 14:33:37 -07:00
swift-ci
0c45030ab9 Merge pull request #9075 from swiftix/partial-specialization-fixes 2017-04-27 14:13:24 -07:00
Xi Ge
539cba9479 [Migrator] Handle enum modernization changes. (#9077) 2017-04-27 14:08:31 -07:00
Dave Abrahams
5ad4ef4508 [stdlib] UnicodeDecoders: bidirectional UnicodeScalar view
Reverse iteration over a collection is significantly slower than forward.

REVERSE_COLLECTION

user	0m4.609s
user	0m4.587s
user	0m4.585s

COLLECTION

user	0m3.423s
user	0m3.517s
user	0m3.492s
2017-04-27 14:00:18 -07:00
Roman Levenstein
0ec4d88b01 Fix the test. Don’t hard code 64 bits. 2017-04-27 13:27:12 -07:00
swift-ci
f6271a3543 Merge pull request #9072 from gottesmm/tbi2 2017-04-27 12:37:56 -07:00
swift-ci
73c4ec9a52 Merge pull request #9071 from nkcsgexi/merge-migrator-test 2017-04-27 12:11:54 -07:00
Michael Gottesman
d4289d65ec Update the TBI test to be conditional on the arm64 code generator instead of targeting arm64.
This ensures that we run the test during normal PR testing and hopefully ensures
I never have to fix this test again = ).

rdar://24370377
2017-04-27 11:42:07 -07:00
swift-ci
979d53af0d Merge pull request #8914 from adrian-prantl/29605924 2017-04-27 11:38:12 -07:00
adrian-prantl
b25d44302f Merge pull request #6403 from adrian-prantl/29481673
Represent Swift errors as DW_TAG_thrown_type in DWARF
2017-04-27 11:28:46 -07:00
Xi Ge
4e224c8b3c [Test] Move test/migrator to test/Migrator. NFC 2017-04-27 12:26:27 -06:00
Jordan Rose
888894c5ba Merge pull request #8987 from jrose-apple/canonicalize-on-swift-4
[ClangImporter] Always import types under their Swift 4 name.
2017-04-27 10:14:02 -07:00
Adrian Prantl
d50448a55f Represent Swift errors as DW_TAG_thrown_type in DWARF
This allows the debugger to display them alongside the function's
return value when finish-ing a function.

rdar://problem/29481673
2017-04-27 09:45:54 -07:00
Erik Eckstein
76eca003bb ArrayElementValuePropagation: explicitly reserve space for new elements when doing the array-content-of optimization
When Array.append(contentOf:) is replaced by individual Array.append(element) calls, an explicit reserveCapacityForAppend is inserted.
2017-04-27 09:06:56 -07:00
Erik Eckstein
e3ae6f29b6 SimplifyCFG: improve jump threading for switch_enum
1) to find a threading candidate for a branch instruction, look through multiple successor blocks and not only in the immediate successor
2) handle SSA-cycles when getting the case for an enum value
2017-04-27 09:06:55 -07:00