Am Samstag, 31. März 2007 00:23 schrieb Paul Cochrane:
> > It would be pretty simple to make this a settable/queryable interpreter
> > property.  Would that be valuable?
>
> It's already a gettable interpreter property
> (interp->recursion_limit).  I'm guessing it would be valuable to be
> able to set the value at runtime.  Coke mentioned this on #parrot.
> Unfortunately, I don't know how to implement this.  Any takers?

The interpreter already has it:
/t/examples/shootout_14.pir:    $P0.'recursion_limit'(100000)

where $P0 isa ParrotInterpreter

static int
recursion_limit(Parrot_Interp interp, PMC *self, int l)
{
    int ret = interp->recursion_limit;
    interp->recursion_limit = l;
    return ret;
}

> Paul

leo

Reply via email to