Commit Graph

8 Commits

Author SHA1 Message Date
Jordan Rose
bc83940301 Make pointer nullability explicit using Optional.
Implements SE-0055: https://github.com/apple/swift-evolution/blob/master/proposals/0055-optional-unsafe-pointers.md

- Add NULL as an extra inhabitant of Builtin.RawPointer (currently
  hardcoded to 0 rather than being target-dependent).
- Import non-object pointers as Optional/IUO when nullable/null_unspecified
  (like everything else).
- Change the type checker's *-to-pointer conversions to handle a layer of
  optional.
- Use 'AutoreleasingUnsafeMutablePointer<NSError?>?' as the type of error
  parameters exported to Objective-C.
- Drop NilLiteralConvertible conformance for all pointer types.
- Update the standard library and then all the tests.

I've decided to leave this commit only updating existing tests; any new
tests will come in the following commits. (That may mean some additional
implementation work to follow.)

The other major piece that's missing here is migration. I'm hoping we get
a lot of that with Swift 1.1's work for optional object references, but
I still need to investigate.
2016-04-11 20:06:38 -07:00
Harlan Haskins
5d888873da [StdlibUnittest] Teach interpreter to run crash tests 2016-04-08 13:12:53 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Oleksandr Tymoshenko
12dd0755af Fix build on FreeBSD
On FreBSD pthread_t and posix_spawn_file_actions_t are opaque pointers
so they should be initialized with nil as on Darwin
2016-03-29 11:49:34 -07:00
Max Moiseev
234bc2830d [stdlib] fixing compilation on Linux 2016-02-29 16:29:20 -07:00
Jordan Rose
e4e9c71d8f StdlibUnittest: Rename enum cases and static vars to match API guidelines. 2016-02-24 18:23:59 -08:00
Max Moiseev
0b759a409c Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-23 14:26:14 -08:00
Brian Gesiak
e7c022679d [stdlib] Rename "PrivateDarwin" to "PrivateLibc"
SwiftPrivateDarwinExtras is used by non-Darwin platforms as well; its
name is misleading. Rename it to SwiftPrivateLibcExtras, which is
closer to its actual function.
2016-02-22 11:07:24 -05:00