Branch: Tag:

1998-01-30

1998-01-30 20:04:32 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

tailrecurse-fix

Rev: src/docode.c:1.29
Rev: src/interpret.c:1.64
Rev: src/peep.in:1.10

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: interpret.c,v 1.63 1998/01/29 06:02:28 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.64 1998/01/30 20:04:32 hubbe Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
1438:    break;       CASE(F_CALL_FUNCTION_AND_RETURN); -  return sp - *--mark_sp; +  { +  INT32 args=sp - *--mark_sp; +  if(!args) +  error("Too few arguments to call_function()\n"); +  switch(sp[-args].type) +  { +  case T_INT: +  case T_STRING: +  case T_FLOAT: +  case T_MAPPING: +  case T_MULTISET: +  error("Attempting to call a non-function value (%s).\n",get_name_of_type(sp[-args].type)); +  } +  return args; +  }       default:    fatal("Strange instruction %ld\n",(long)instr);