Understanding regexes (Was: Re: DMD 0.147 release)
Sean Kelly
sean at f4.ca
Wed Feb 22 08:40:50 PST 2006
Lionello Lunesu wrote:
> Interesting indeed.
>
> Is there no way to "fold constants" in this kind of code too? If you know
> the inputs to a function are all constant, can't you simply replace the
> inputs + function call with the function's output?
If the function can be inlined and the operations it contains are also
subject to constant folding then the optimizer should already do this.
Otherwise, while it's possible in some cases I don't know of a compiler
that does this. I believe this has been talked about on the C++ forums
as "atomic functions."
Sean
More information about the Digitalmars-d-announce
mailing list