pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:4570:    enum pt_remap_flags remap_flags)   {   #ifdef DEBUG_MALLOC   #define low_type_binop(OP, A, B, REMAP, AFLAGS, BFLAGS, REMAP_FLAGS) \    ((struct pike_type *) \    debug_malloc_pass(low_type_binop(OP, debug_malloc_pass(A), \    debug_malloc_pass(B), \    debug_malloc_pass(REMAP), \    AFLAGS, BFLAGS, REMAP_FLAGS)))   #endif /* DEBUG_MALLOC */ - #ifdef PIKE_DEBUG -  struct pike_type **save_type_stackp = Pike_compiler->type_stackp; -  struct pike_type ***save_mark_stackp = Pike_compiler->pike_type_mark_stackp; - #endif +     struct pike_type *ret; -  +  DECLARE_CYCLIC();    -  +  if (BEGIN_CYCLIC3(a, b, (ptrdiff_t)op)) { + #if 0 +  END_CYCLIC(); +  +  if (op & PT_BINOP_AND) { +  return remap_markers(a, remap, remap_flags); +  } +  return NULL; + #endif +  } +  SET_CYCLIC_RET(1); +     if (remap_flags & PT_FLAG_REMAP_TRACE) {    fprintf(stderr, "low_type_binop(0x%04x, ", op);    simple_describe_type(a);    fprintf(stderr, ", ");    simple_describe_type(b);    fprintf(stderr, ", %p, 0x%04x, 0x%04x, 0x%02x)\n",    remap, aflags, bflags, remap_flags); -  } +        ret = debug_malloc_pass(lower_type_binop(op, a, b, remap,    aflags, bflags, remap_flags));    -  if (remap_flags & PT_FLAG_REMAP_TRACE) { +     fprintf(stderr, "ret: ");    simple_describe_type(ret);    fprintf(stderr, "\n"); -  } +     - #ifdef PIKE_DEBUG -  if ((save_type_stackp != Pike_compiler->type_stackp) || -  (save_mark_stackp != Pike_compiler->pike_type_mark_stackp)) { -  fprintf(stderr, "low_type_binop stack level corruption!\n" -  "op : 0x%x\na: ", op); -  simple_describe_type(a); -  fprintf(stderr, "\nb: "); -  simple_describe_type(b); -  fprintf(stderr, "\nret: "); -  simple_describe_type(ret); -  fprintf(stderr, "\n\n"); -  -  Pike_fatal("Stack level corruption!\n" -  "type stack: %p (expected: %p)\n" -  "mark stack: %p (expected: %p)\n", -  Pike_compiler->type_stackp, save_type_stackp, -  Pike_compiler->pike_type_mark_stackp, save_mark_stackp); +  END_CYCLIC(); +  return ret;    } - #endif +     -  +  ret = debug_malloc_pass(lower_type_binop(op, a, b, remap, +  aflags, bflags, remap_flags)); +  END_CYCLIC();    return ret;   }   static struct pike_type *lower_type_binop(enum pt_binop op,    struct pike_type *a,    struct pike_type *b,    struct remap_state *remap,    enum pt_cmp_flags aflags,    enum pt_cmp_flags bflags,    enum pt_remap_flags remap_flags)   {