D-Programming-Language/druntime — pull request #296 by alexrp (2012-09-05 15:05:59+00:00)
Title: Various attributes and runtime interface cleanups.

OK, I know we don't like huge pull requests with lots of different things in them, but there were a bunch of things in these commits that affected each other, making separating them a bit of a pain. I have tried to keep commits as self-contained as possible, however, so reviewing should be reasonably easy. Still, some commits in here will not build by themselves because they have too far-reaching consequences

I recommend looking at the individual commits to see what this pull request does (the entire combined diff is a bit confusing).

This pull request does the following:

* Marks core.atomic `@trusted`.
* Marks core.math `@safe pure nothrow`. (I know this module is not part of the public interface.)
* Marks all of `core.memory` nothrow instead of every single function (just cosmetic).
* Marks some core.stdc.time functions `@system` as they deal in C strings.
* Applies `@trusted` and `nothrow` in a large number of `core.sys` modules.
* Removes an annoying `pragma(msg, ...)` from core.sys.posix.time.
* Removes the `setSameMutex` function from the public interface. (@complexmath This was added by you, so please weigh in on whether this is OK (see my mailing list thread).)
* Makes `rt_init` discard exceptions as documented when no exception handler function is passed.
* Marks some `core.thread` functions `nothrow`. (Needed due to the `core.sys` changes.)
* Makes `callWithStackShell` use call-by-alias for better inlining opportunities.
* Updates the change log.

Apart from these changes, commit 2d08205b2c6ad48ced782367c05766b0fd8fdabe makes some changes to some runtime interfaces. Specifically:

* Makes many functions and function pointers exposed in the public API `nothrow`.
* Makes `Runtime.args` return an array of `const` strings.
* Moves overriding of the assert handler to the new `Runtime.assertHandler` property.

These are breaking changes. However, I feel that they are necessary in order to make the runtime interface consistent (and reliable, as far as `nothrow` goes).

Again, sorry for the rather monolithic pull request. I was in a hurry throwing this together, but it should at least be possible to review since it's not just one huge commit.