Jonathan Sillito <[EMAIL PROTECTED]> writes: > On 2 Nov 2002, Juergen Boemmels wrote: > > > Ok, I tested the patch (I tried to use this scratchpads for the scheme > > compiler) > > One thing I missed (or at least didn't find): How can I generate a new > > scope? new_pad generates a new one one the pad stack with a size which > > is actually smaller than the current one. > > I may be misunderstanding the question, but I'll try and answer anyway. > There are two ways to create a new scratchpad. The first looks like: > > op new_pad(in INT) > > which creates a new scratchpad and grabs to depth <int> of the current > scope (i.e. the scratchpad at the top of the stack). This I think will > be the usual way to create a new scope.
[...] Ok, one minor thing. If you just extend a pad you need to know the actual nesting depth. The vtable function elements returns this information, but there is ATM no operation in core.ops which calls it. If you allow a negativ argument to new_pad, meaning to copy from 0 to depth+$1 inclusive, this would make the common case of just extending the scope more easy. I attached a cascading patch (because its easier to review)