Commit Graph

10 Commits

Author SHA1 Message Date
troughton
cf28ff448c Remove TwoWordPair and use SwiftCC instead. 2018-02-03 09:43:00 +13:00
Joe Groff
a7a3b17597 Replace nominal type descriptors with a hierarchy of context descriptors.
This new format more efficiently represents existing information, while
more accurately encoding important information about nested generic
contexts with same-type and layout constraints that need to be evaluated
at runtime. It's also designed with an eye to forward- and
backward-compatible expansion for ABI stability with future Swift
versions.
2018-01-29 16:19:25 -08:00
Greg Parker
7b9224794e [runtime] Reinstate TwoWordPair hack for swiftcall returns. (#14079)
clang is miscompiling some swiftcall functions on armv7s.
Stop using swiftcall in some places until it is fixed.

Reverts c5bf2ec (#13299).

rdar://35973477
2018-01-23 01:04:01 -08:00
Thomas Roughton
c5bf2ec553 [runtime] Remove TwoWordPair and use the Swift calling convention instead. (#13299) 2017-12-07 19:27:24 -08:00
Jordan Rose
fd3b585de0 [stdlib] Surface NSKeyedArchiver issues in Xcode.
By calling through to swift_reportToDebugger, Xcode can pick up the
NSKeyedArchiver/Unarchiver issues with Swift classes and display them
in the Issues Navigator. This increases the probability that they'll
be seen and acted upon.

This is not a fully-general interface yet, please do not start hooking
random things up to it. Especially if you're working on something that
doesn't ship with Xcode itself. :-)

rdar://problem/32900735
2017-07-13 11:19:03 -07:00
Jordan Rose
f868d6dffe Fix up 08c2a7a3ac for 32-bit platforms. (#10433)
...where swift::TwoWordPair is defined a little less freely.
2017-06-20 19:24:36 -07:00
Jordan Rose
08c2a7a3ac Finish off the log part of _swift_checkClassAndWarnForKeyedArchiving. (#10418)
Logs a warning the first time a problematic class is archived or
unarchived. We expect people to actually fix these issues, so the
performance of the warning isn't too important.

Sample output:

  [timestamp] Attempting to archive Swift class '_Test.Outer.ArchivedThenUnarchived', which does not have a stable runtime name.
  [timestamp] Use the 'objc' attribute to ensure that the runtime name will not change: "@objc(_TtCC5_Test5Outer22ArchivedThenUnarchived)"
  [timestamp] If there are no existing archives containing this class, you can choose a unique, prefixed name instead: "@objc(ABCArchivedThenUnarchived)"

Finishes rdar://problem/32414508
2017-06-20 17:15:28 -07:00
Erik Eckstein
ce188682e5 runtime: remove an unnecessary helper function to get the class name 2017-06-13 15:20:07 -07:00
Erik Eckstein
1bff67f573 runtime: use class_getName instead of NSStringFromClass in _swift_checkClassAndWarnForKeyedArchiving 2017-06-13 09:25:42 -07:00
Erik Eckstein
488c43c825 runtime: add a runtime function _swift_checkClassAndWarnForKeyedArchiving
This function checks if a mangled class name is going to be written into an NSArchive.
If yes, a warning should be printed and the return value should indicate that.

TODO: print the actual warning

rdar://problem/32414508
2017-06-07 17:02:00 -07:00