Branch: Tag:

1998-07-28

1998-07-28 23:02:43 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

bugfix for catch { return foo(); }

Rev: src/interpret.c:1.93
Rev: src/testsuite.in:1.118

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: interpret.c,v 1.92 1998/07/17 19:53:16 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.93 1998/07/28 23:02:42 hubbe Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
1373:    CASE(F_APPLY_AND_RETURN);    {    INT32 args=sp - *--mark_sp; + /* fprintf(stderr,"%p >= %p\n",fp->expendible,sp-args); */    if(fp->expendible >= sp-args)    { -  + /* fprintf(stderr,"NOT EXPENDIBLE!\n"); */    MEMMOVE(sp-args+1,sp-args,args*sizeof(struct svalue));    sp++;    sp[-args-1].type=T_INT;
2128:    fp->expendible=expendible;    return 0;    }else{ -  int x=eval_instruction(pc); +  int x; +  fp->expendible=fp->locals + fp->num_locals; +  x=eval_instruction(pc); +  fp->expendible=expendible;    if(x!=-1) mega_apply(APPLY_STACK, x, 0,0);    UNSETJMP(tmp); -  fp->expendible=expendible; +     return 1;    }   }