Array bound checks removal increasing importance

rst256 via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 26 02:13:48 PDT 2014


On Saturday, 31 May 2014 at 23:30:41 UTC, Walter Bright wrote:
> On 5/31/2014 4:06 PM, "Nordlöw" wrote:
>> I've looked around in DMD for a suitable place to add checks 
>> for this but
>> haven't found the spot where range-check is injected. Help 
>> anyone?
>
> There isn't a suitable place. To make it work, data flow 
> analysis would have to be added to the front end. While doable, 
> this is not a simple addition. Eventually, we'll have to do it 
> as a lot of things become possible & better with data flow 
> analysis, not just bounds check elimination.

I just wanted to check the possibility
of more cost-free checking array bounds.
For development researches  possible to disable the check?
Of couse its not critical, Monkey patch, replace call on nup
But you must understand that this can distort test result.

This checking bounds method of couse for
using only after all debuging works is done.
His bassed on print a stack trace in signal handler,
or if it is release code programmer wish to call crashe responce
application. by the way this can optimize program code
Because in any case, application be closed.


More information about the Digitalmars-d mailing list