pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:5356:    case TWOT(T_FUNCTION, T_MANY):    case TWOT(T_MANY, T_FUNCTION):    case TWOT(T_MANY, T_MANY):    {    int nargs;    struct pike_type *ai = a;    struct pike_type *bi = b;    enum pt_cmp_flags avoidable = 0;    enum pt_cmp_flags bvoidable = 0;    +  /* FIXME: What about function(__unknown__...:mixed|void)? */ +  if ((b->type == T_MANY) && !b->car && (b->cdr == mixed_type_string)) { +  /* Common case. function(__unknown__...:mixed) */ +  if (op == PT_BINOP_AND) { +  return remap_markers(a, remap, remap_flags); +  } +  return NULL; +  } +  if ((a->type == T_MANY) && !a->car && (a->cdr == mixed_type_string)) { +  /* Common case. function(__unknown__...:mixed) */ +  if (op == PT_BINOP_AND) { +  return remap_markers(b, remap, +  remap_flags ^ PT_FLAG_REMAP_SWAP_MARKERS); +  } +  add_ref(a); +  return a; +  } +     type_stack_mark();       switch(op) {    case PT_BINOP_AND:    /* NB: For simplicity in the (common case)    * many(assign(m, mixed), m),    * we expand the many node (as required) to    * function(assign(m, mixed), many(assign(m, mixed), m)),    * and leave it to the evaluator to join the multiple    * assignments with or. The alternative (and stricter) would