[plt-scheme] what are the exact mzc flags to disable all optimizations?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue May 11 16:35:51 EDT 2010

It can't figure out which way this test goes (and this is promised, I
believe, by Matthew to remain stupid):

(if (zero? (random 1)) ...)

So you can use that to do things like this:

(define a 42)
(if (zero? (random 1)) (set! a a) (set! a 43))
(if (even? a) 'ok 'not-ok)

Robby

On Tue, May 11, 2010 at 3:15 PM, Danny Yoo <dyoo at cs.wpi.edu> wrote:
> I'm trying to get mzc to produce stupid code temporarily (I'm
> debugging an interpreter).  mzc's being too smart for me.  I'm trying
> the following:
>
>    mzc --disable-inline --no-prop ...
>
> One of my test programs I'm feeding through mzc:
>
>    (if (even? 42) 'ok 'not-ok)
>
> but the optimizer is just compiling this down to 'ok.  What magic
> flags do I pass to mzc to have it stop optimizing primitive
> application?
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.