[plt-scheme] compiler/zo-parse questions

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Apr 15 15:52:52 EDT 2010

I believe it is only used by the verifier and it only needs to be an
upper bound (unless it is really really large in which case you might
cause the verifier to run out of memory or something, but that's

Casey and Matthew would know best, tho.


On Thu, Apr 15, 2010 at 2:49 PM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> If you are having crashes with the output of my batch compiler, it may
> handle this value incorrectly. (I assumed it was safe to take the max
> when merging forms, rather than adding them or doing a recalculation.)
> Jay
> On Thu, Apr 15, 2010 at 1:42 PM, Robby Findler
> <robby at eecs.northwestern.edu> wrote:
>> You might want to read Casey's master's paper for some of this detail
>> (there should be a journal paper at some point that expands on this
>> too). It explains the mzscheme machine in more detail.
>> On Thu, Apr 15, 2010 at 2:37 PM, Danny Yoo <dyoo at cs.wpi.edu> wrote:
>>> I'm working on a project involving compiler/zo-parse,
>>>    http://docs.plt-scheme.org/mzc/decompile.html
>>> I'm trying to understand what max-let-depth is used for; it exists
>>> under the toplevel, module, and lambda forms.  How does the mzscheme
>>> runtime use this value?
>> The max-let-depth has to be a number larger than the amount of stack
>> that the machine needs to push to evaluate that function (or module
>> body, etc) or else the machine will crash (since it believes the
>> number). The byte code verifier ensures the number is correct before
>> running the bytecode.
>>> There's also a curious note for several of the forms with the
>>> following structure:
>>>    After <X> is evaluated, the stack is restored to its depth from
>>> before evaluating <X>.
>>> I don't understand this yet.  I suspect that, under some
>>> implementations, a frame is pushed onto the stack to make it possible
>>> to capture the current continuation, and the note is saying what
>>> requirements are necessary to preserve tail calls.  Is that the way to
>>> interpret the comment?
>> Sorry, I'm not sure about this one, but I agree it does sound like
>> something to do with tail calls.
>> Robby
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://teammccarthy.org/jay
> "The glory of God is Intelligence" - D&C 93

Posted on the users mailing list.