Branch: Tag:

2001-12-19

2001-12-19 10:50:30 by Martin Stjernholm <mast@lysator.liu.se>

Added optional flag to the magic indexing functions to control the type of
indexing. Intentionally left undocumented for the time being, in case a
better api is found.

Rev: src/las.c:1.279
Rev: src/object.c:1.191

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.278 2001/12/16 22:48:08 mast Exp $"); + RCSID("$Id: las.c,v 1.279 2001/12/19 10:50:30 mast Exp $");      #include "language.h"   #include "interpret.h"
4057:    case F_MAGIC_INDEX:    /* FIXME: Could have a stricter type for ::`->(). */    /* FIXME: */ -  MAKE_CONSTANT_TYPE(n->type, tFunc(tMix,tMix)); +  MAKE_CONSTANT_TYPE(n->type, tFunc(tMix tOr(tVoid,tInt),tMix));    break;    case F_MAGIC_SET_INDEX:    /* FIXME: Could have a stricter type for ::`->=(). */    /* FIXME: */ -  MAKE_CONSTANT_TYPE(n->type, tFunc(tMix tSetvar(0,tMix), tVar(0))); +  MAKE_CONSTANT_TYPE(n->type, tFunc(tMix tSetvar(0,tMix) tOr(tVoid,tInt), tVar(0)));    break;    case F_MAGIC_INDICES: -  MAKE_CONSTANT_TYPE(n->type, tFunc(tNone, tArr(tString))); +  MAKE_CONSTANT_TYPE(n->type, tFunc(tOr(tVoid,tInt), tArr(tString)));    break;    case F_MAGIC_VALUES:    /* FIXME: Could have a stricter type for ::_values. */ -  MAKE_CONSTANT_TYPE(n->type, tFunc(tNone, tArray)); +  MAKE_CONSTANT_TYPE(n->type, tFunc(tOr(tVoid,tInt), tArray));    break;       case F_CATCH: