Branch: Tag:

2011-01-15

2011-01-15 15:21:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added predef::types() in analogue with indices() and values().

Also adds lfun::_types() and ::_types().

816:    case F_MAGIC_INDEX:    case F_MAGIC_INDICES:    case F_MAGIC_VALUES: +  case F_MAGIC_TYPES:    {    int e;    struct program_state *state = Pike_compiler;
4287:    /* FIXME: Could have a stricter type for ::_values. */    MAKE_CONSTANT_TYPE(n->type, tFunc(tOr(tVoid,tInt), tArray));    break; +  case F_MAGIC_TYPES: +  /* FIXME: Could have a stricter type for ::_types. */ +  MAKE_CONSTANT_TYPE(n->type, tFunc(tOr(tVoid,tInt), tArr(tType(tMix)))); +  break;       case F_CATCH:    /* FALL_THROUGH */