Branch: Tag:

2022-04-13

2022-04-13 09:44:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added some special cases.

Special cases for matching against function(__unknown__...:mixed).

5363:    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) {