pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:3997:    object, f->current_object);    add_ref(f->current_object);    function = ID_FROM_INT(f->current_object->prog, f->fun);   #ifdef PIKE_DEBUG    add_ref(bf->oprog = bf->_fun.u.object->prog);   #endif    }    }       if (f->locals) { -  INT32 numargs = (INT32) MINIMUM(f->num_args, -  stack_top - f->locals); +  INT32 numargs = f->num_args;    INT32 varargs = 0;    -  if(of && of->locals) { +  if (!(f->flags & PIKE_FRAME_MALLOCED_LOCALS)) { +  numargs = MINIMUM(numargs, stack_top - f->locals); +  +  if(of && of->locals && !(of->flags & PIKE_FRAME_MALLOCED_LOCALS)) {    /* f->num_args can be too large, so this is necessary for some    * reason. I don't know why. /mast    *    * possibly because f->num_args was uninitialized for c_initializers    * /arne    * */    -  numargs = (INT32)MINIMUM(f->num_args,of->locals - f->locals); +  numargs = (INT32)MINIMUM(numargs, of->locals - f->locals);    }       numargs = MAXIMUM(numargs, 0); -  +  } else { +  numargs = MINIMUM(numargs, f->locals[-1].u.array->size); +  }       /* Handle varargs... */    if (function && (function->identifier_flags & IDENTIFIER_VARARGS) && -  (f->locals + numargs < stack_top) && +     (TYPEOF(f->locals[numargs]) == T_ARRAY)) {    varargs = f->locals[numargs].u.array->size;    }       if (numargs + varargs) {    bf->args = allocate_array_no_init(numargs + varargs, 0);    bf->args->type_field =    assign_svalues_no_free(bf->args->item, f->locals, numargs, BIT_MIXED);    if (varargs) {    bf->args->type_field |=