Branch: Tag:

2001-12-16

2001-12-16 22:48:09 by Martin Stjernholm <mast@lysator.liu.se>

Added magic ::_indices and ::_values.

Rev: src/docode.c:1.138
Rev: src/interpret_functions.h:1.99
Rev: src/language.yacc:1.268
Rev: src/las.c:1.278
Rev: src/object.c:1.190
Rev: src/object.h:1.67
Rev: src/program.c:1.394

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.277 2001/12/16 02:49:40 mast Exp $"); + RCSID("$Id: las.c,v 1.278 2001/12/16 22:48:08 mast Exp $");      #include "language.h"   #include "interpret.h"
1007:    res->node_info |= OPT_ASSIGNMENT;    /* FALL_THROUGH */    case F_MAGIC_INDEX: +  case F_MAGIC_INDICES: +  case F_MAGIC_VALUES:    {    int e;    struct program_state *state = Pike_compiler;
4062:    /* FIXME: */    MAKE_CONSTANT_TYPE(n->type, tFunc(tMix tSetvar(0,tMix), tVar(0)));    break; +  case F_MAGIC_INDICES: +  MAKE_CONSTANT_TYPE(n->type, tFunc(tNone, tArr(tString))); +  break; +  case F_MAGIC_VALUES: +  /* FIXME: Could have a stricter type for ::_values. */ +  MAKE_CONSTANT_TYPE(n->type, tFunc(tNone, tArray)); +  break;       case F_CATCH:    /* FALL_THROUGH */