Yukihiro Matsumoto <matz / ruby-lang.org> wrote:
> In message "Compile time constant folding?"
>     on 03/01/06, Dan Sugalski <dan / sidhe.org> writes:
> |Is it valid to do compile-time constant folding as an optimization?

> I didn't take it, because
> [ redefinition etc ]

Wouldn't it be nice to have the compiler not to fold this expressions
(because of the stated problems) but to write a profiling log containing all
the places where folding could be possible, so that the programmer can
decide afterwards to give the compiler some hints (by manually changing
code _or_ perhaps by some function 
evalct do 
  ... 
end 
where the compiler is allowed to fold anything within the block (while the
interpreter just evaluates the block ignoring the evalct).

Stony
    (42)
-- 

 ======================================
   The Answer is 42.
   And I am the Answer.
   Now I am looking for the Question.
 ======================================