D-Programming-Language/druntime — pull request #198 by alexrp (2012-04-27 11:47:04+00:00)
Title: Mark some GC functions pure and/or nothrow.

A few things worth noting:

* These functions actually can be nothrow, because the only exceptions they can throw are Errors.
* Yes, marking the functions with these modifiers means future implementations have to follow them. I don't think this is a problem, however, and the current situation (no modifiers at all) is very annoying.
* I haven't marked the actual functions inside the GC with these modifiers. I didn't feel that cascading them all the way to the GC implementation was necessary; the GC is a low-level component of the runtime and thus deserves as much freedom as it can get. That said, I did verify that none of the functions marked nothrow can throw.
* I'm not sure if the application of `pure` is entirely correct. I think it makes sense in terms of weak purity, but please correct me if I'm wrong.