[Issue 13976] Value range propagation to disable some slice bound tests

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jan 15 10:33:31 PST 2015


https://issues.dlang.org/show_bug.cgi?id=13976

Per Nordlöw <per.nordlow at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |per.nordlow at gmail.com

--- Comment #3 from Per Nordlöw <per.nordlow at gmail.com> ---
Does this include avoiding range checking in expressions such as

```D
x[0 .. $/2, $2..$]
```

which is a reoccurring pattern in D-style binary divide-and-conquer algorithms.

It would be super-cool if it worked for 

rational variants with slice indexes in the form 

```D
$*p/q
```
where it can be statically proven that `p <= q`.

--


More information about the Digitalmars-d-bugs mailing list