Branch: Tag:

1999-11-25

1999-11-25 16:40:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added support for runtime checks of soft casts.

Rev: src/interpreter.h:1.19

1285:       CASE(F_CAST); f_cast(); break;    +  CASE(F_SOFT_CAST); + #ifdef PIKE_DEBUG +  if (d_flag) { +  /* FIXME: Perform a type-check here */ +  /* Stack: type_string, value */ +  if (d_flag > 1) { +  struct pike_string *t = describe_type(sp[-2].u.string); +  fprintf(stderr, "Soft cast to %s\n", t->str); +  free_string(t); +  } +  } + #endif /* PIKE_DEBUG */ +  stack_swap(); +  pop_stack(); +  break; +     CASE(F_RANGE); o_range(); break;    CASE(F_COPY_VALUE);    {