Branch: Tag:

2001-06-17

2001-06-17 18:18:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added F_CAST_TO_INT.

Rev: src/docode.c:1.118
Rev: src/interpret_functions.h:1.60
Rev: src/opcodes.c:1.111
Rev: src/opcodes.h:1.15

5:   \*/   /**/   #include "global.h" - RCSID("$Id: docode.c,v 1.117 2001/06/13 21:53:25 grubba Exp $"); + RCSID("$Id: docode.c,v 1.118 2001/06/17 18:18:05 grubba Exp $");   #include "las.h"   #include "program.h"   #include "pike_types.h"
1071:    {    DO_CODE_BLOCK(CAR(n));    return 0; +  } else if (n->type == int_type_string) { +  tmp1 = do_docode(CAR(n), 0); +  if(!tmp1) { emit0(F_CONST0); tmp1=1; } +  else { +  if(tmp1>1) do_pop(DO_NOT_WARN((INT32)(tmp1-1))); +  emit0(F_CAST_TO_INT);    } -  +  return 1; +  } else if (compile_type_to_runtime_type(n->type) == PIKE_T_MIXED) { +  tmp1 = do_docode(CAR(n), 0); +  if(!tmp1) +  emit0(F_CONST0); +  else if(tmp1>1) +  do_pop(DO_NOT_WARN((INT32)(tmp1-1))); +  return 1; +  }    {    struct svalue sv;    sv.type = T_TYPE;