Table lookups - this is pretty definitive

Dmitry Olshansky dmitry.olsh at gmail.com
Thu Apr 3 13:20:16 PDT 2014


03-Apr-2014 01:51, Walter Bright пишет:
> On 4/2/2014 1:54 PM, Dmitry Olshansky wrote:
>> If we can alter semantics of
>> return foo(arg);
>> to _always_ be a goto, guarantee a jump and reuse of the stack,  then
>> I'm all
>> for it.
>
> I don't see why not. Note that we couldn't do this for extern(C)
> functions, or variadics, or caller functions with parameters that need
> destruction, or parameters that may refer to any locals. That last
> constraint might be a doozy, however.
>
> Why not submit an enhancement request to bugzilla?

I'd gladly author an enhancement once I'm certain of what exactly to 
state in it.

Always optimizing return foo(args) to a jump may have impact on 
debugging experience (curious call-stacks) and cost people hours of 
wasted time chasing shadows.

Adding an explicit form for it seems to me far more appealing and honest.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list