pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:291:    * TYPE type -    * PROGRAM type -    * MIXED - -    * VOID - -    * ZERO - -    * UNKNOWN - -    * INT min (int) max (int)    * OBJECT implements/is object id(int)    * OPERATOR type Depends on bit #15. Added in 8.1    * FIND_LFUN object type lfun (int) Added in 8.1 +  * GET_RETURN fun type - Added in 8.1    * SET_CAR type type Added in 8.1    * SET_CDR type type Added in 8.1    * TRANSITIVE fun_type fun_type Added in 8.1    *    * Note that the cdr of a FUNCTION is a valid FUNCTION for the rest of    * the arguments.    *    * Note also that functions that don't take any arguments, or just    * a many argument just have a MANY node, and no FUNCTION node.    *
pike.git/src/pike_types.cmod:2882:    break;       case PIKE_T_TRANSITIVE:    string_builder_sprintf(s, "transitive(%T, %T)", t->car, t->cdr);    break;       default:    {    if ((t->type & PIKE_T_MASK) == PIKE_T_OPERATOR) {    switch(t->type) { +  case PIKE_T_GET_RETURN: +  string_builder_strcat(s, "get_return"); +  break;    case PIKE_T_SET_CAR:    string_builder_strcat(s, "set_car");    break;    case PIKE_T_SET_CDR:    string_builder_strcat(s, "set_cdr");    break;    default:    string_builder_sprintf(s, "operator(0x%04x)", t->type);    break;    }
pike.git/src/pike_types.cmod:4116:    break;       case PIKE_T_OPERATOR:    push_remap_markers(t->car, markers, remap, flags);       if (t->type & 0x8000) {    push_remap_markers(t->cdr, markers, remap, flags);    push_reverse_type(t->type);    } else {    switch(t->type) { +  case PIKE_T_GET_RETURN: +  push_type_operator(t->type, NULL); +  break;    case PIKE_T_FIND_LFUN:    push_type_operator(t->type, t->cdr);    break;    default:    Pike_fatal("Unsupported operator %d in push_remap_markers().\n",    t->type);    break;    }    }    break;
pike.git/src/pike_types.cmod:12492:   */    return NULL;   }      struct pike_type *apply_type_operator(enum PIKE_TYPE op,    struct pike_type *arg1,    struct pike_type *arg2)   {    struct pike_type *res = NULL;    switch(op) { +  case PIKE_T_GET_RETURN: +  res = new_get_return_type(arg1, 0); +  break;    case PIKE_T_FIND_LFUN:    res = find_lfun_type(arg1, (ptrdiff_t)(void*)arg2);    break;    case PIKE_T_SET_CAR:    if (!arg1) return NULL;    switch(arg1->type) {    case PIKE_T_FUNCTION:    case PIKE_T_MANY:    case PIKE_T_RING:    case PIKE_T_TUPLE:
pike.git/src/pike_types.cmod:13219:    if (lfun == -1) {    Pike_fatal("compile_type_string(): Unknown lfun: \"%s\"\n", *cont);    }    *cont += str->len + 1;       push_type_operator(PIKE_T_FIND_LFUN,    (struct pike_type *)(ptrdiff_t)lfun);    break;    }    +  case PIKE_T_GET_RETURN: +  low_make_pike_type(type_string + 2, cont); +  push_type_operator(type, NULL); +  break; +     default:    Pike_fatal("compile_type_string(): Unknown operator: 0x%04x\n", type);    break;    }    }    break;    }   #ifdef PIKE_DEBUG    default:    Pike_fatal("compile_type_string(): Error in type string %d.\n", type);