Null pointer check elimination

Chris Gray chris.gray@kiffer.be
Mon Nov 14 20:48:00 GMT 2005


On Sunday 13 November 2005 01:47, Tom Tromey wrote:
> >>>>> "Chris" == Chris Gray <chris.gray@kiffer.be> writes:
>> Chris> Another way to look at functions which return 'this' (and there
> Chris> are plenty of those in the core Java libraries) is that
> Chris> [...]

> [...]
> I wouldn't want this idea to hold up Anthony's patch though. I think
> they are separable and, as this one is harder to implement, it is
> reasonable to go with something easy first.

In the general case it's not easy, but in the context of special-casing 
intensively used parts of the core API (cf. memcpy) it looks attractive (and 
it can maybe save a lot of code, not just the null pojnter check but the 
whole dup - push - invoke jazz). The non-null return type is of course more 
general, and applies also to randomly ingested code, so the two ideas are 
indeed separable.
-- 
Chris Gray /k/ Embedded Java Solutions BE0503765045
Embedded & Mobile Java, OSGi http://www.kiffer.be/k/
chris.gray@kiffer.be +32 3 216 0369


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /