Why exceptions for error handling is so important
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jan 12 16:04:48 PST 2015
On 1/12/2015 3:17 PM, deadalnix wrote:
> On Monday, 12 January 2015 at 22:17:57 UTC, Walter Bright wrote:
>> Yes, it does. Returning an int in EAX now becomes returning a pair [EAX,EDX].
>
> It is not that big of a deal, EDX is a trash register anyway if memory serve,
> but then, it become very bad when it do not fit in register anymore.
Returning a slice, for example, already consumes EAX and EDX. Adding an error
code pushes that into returning via a pointer to a stack temporary.
Also, there's the code needed to load the value into EDX in the first place.
It adds up.
More information about the Digitalmars-d
mailing list