pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:2443:    STACK_LEVEL_DONE (0);   });      #ifndef ENTRY_PROLOGUE_SIZE   #define ENTRY_PROLOGUE_SIZE 0   #endif /* !ENTRY_PROLOGUE_SIZE */      #define DO_RECUR(XFLAGS) do{ \    PIKE_OPCODE_T *addr; \    register struct pike_frame *new_frame; \ -  ptrdiff_t args; \ +  INT32 args = DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)); \    \    DO_IF_SECURITY(CHECK_DATA_SECURITY_OR_ERROR(Pike_fp->current_object, \    SECURITY_BIT_CALL, \    ("Function call permission denied.\n"))); \    \    FAST_CHECK_THREADS_ON_CALL(); \    check_stack(256); \    \    new_frame=alloc_pike_frame(); \    \    new_frame->refs=1; /* FIXME: Is this needed? */ \    new_frame->next=Pike_fp; \    \    JUMP_SET_TO_PC_AT_NEXT (addr); \    Pike_fp->return_addr = (PIKE_OPCODE_T *)(((INT32 *) addr) + 1); \    addr += GET_JUMP(); \    \ -  new_frame->num_locals = READ_INCR_BYTE(addr); \ -  args = READ_INCR_BYTE(addr); \ +     addr += ENTRY_PROLOGUE_SIZE; \    \ -  new_frame->num_args = new_frame->args = args; \ +  if (Pike_interpreter.trace_level > 3) { \ +  fprintf(stderr, "- Addr = 0x%+lx\n", addr); \ +  } \ +  \ +  new_frame->args = args; \    new_frame->locals=new_frame->save_sp=new_frame->expendible=Pike_sp-args; \    new_frame->save_mark_sp = new_frame->mark_sp_base = Pike_mark_sp; \    \ -  push_zeroes(new_frame->num_locals - args); \ -  \ -  DO_IF_DEBUG({ \ -  if(Pike_interpreter.trace_level > 3) \ -  fprintf(stderr,"- Allocating %d extra locals.\n", \ -  new_frame->num_locals - new_frame->num_args); \ -  if (Pike_fp && (new_frame->locals < Pike_fp->locals)) { \ -  fatal("New locals below old locals: %p < %p\n", \ -  new_frame->locals, Pike_fp->locals); \ -  } \ -  }); \ -  \ -  \ +     SET_PROG_COUNTER(addr); \    new_frame->fun=Pike_fp->fun; \    DO_IF_PROFILING( new_frame->ident=Pike_fp->ident ); \    new_frame->current_storage=Pike_fp->current_storage; \    if(Pike_fp->scope) add_ref(new_frame->scope=Pike_fp->scope); \    add_ref(new_frame->current_object = Pike_fp->current_object); \    add_ref(new_frame->current_program = Pike_fp->current_program); \    new_frame->context = Pike_fp->context; \    \    DO_IF_PROFILING({ \
pike.git/src/interpret_functions.h:2549:    */    if(((p != Pike_fp->context->prog) ||    (Pike_fp->context !=    &p->inherits[p->identifier_references[Pike_fp->context->identifier_level +    arg1].inherit_offset])) ||    (ID_FROM_INT(p, arg1+Pike_fp->context->identifier_level)->    identifier_flags & IDENTIFIER_SCOPE_USED))    {    PIKE_OPCODE_T *faddr;    ptrdiff_t num_locals; -  ptrdiff_t args; +  INT32 args = DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp));       JUMP_SET_TO_PC_AT_NEXT (faddr);    faddr += GET_JUMP(); -  num_locals = READ_INCR_BYTE(faddr); /* ignored */ -  args = READ_INCR_BYTE(faddr); +        if(low_mega_apply(APPLY_LOW,    args,    Pike_fp->current_object,    (void *)(ptrdiff_t)(arg1+    Pike_fp->context->identifier_level)))    {    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL;    addr = Pike_fp->pc;    }
pike.git/src/interpret_functions.h:2588:   OPCODE0_PTRJUMP(F_RECUR_AND_POP, "recur & pop", I_UPDATE_ALL, {    DO_RECUR(PIKE_FRAME_RETURN_POP);   });         /* Assume that the number of arguments is correct */   /* FIXME: adjust Pike_mark_sp */   OPCODE0_PTRJUMP(F_TAIL_RECUR, "tail recursion", I_UPDATE_ALL, {    INT32 num_locals;    PIKE_OPCODE_T *addr; -  INT32 args; +  INT32 args = DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp));       FAST_CHECK_THREADS_ON_CALL();       JUMP_SET_TO_PC_AT_NEXT (addr);    addr += GET_JUMP(); -  num_locals = READ_INCR_BYTE(addr); -  args = READ_INCR_BYTE(addr); +     addr += ENTRY_PROLOGUE_SIZE;    SET_PROG_COUNTER(addr);       if(Pike_sp-args != Pike_fp->locals)    {    DO_IF_DEBUG({    if (Pike_sp < Pike_fp->locals + args)    Pike_fatal("Pike_sp (%p) < Pike_fp->locals (%p) + args (%d)\n",    Pike_sp, Pike_fp->locals, args);    });    assign_svalues(Pike_fp->locals, Pike_sp-args, args, BIT_MIXED);    pop_n_elems(Pike_sp - (Pike_fp->locals + args));    }    -  push_zeroes(num_locals - args); -  -  DO_IF_DEBUG({ -  if(Pike_sp != Pike_fp->locals + Pike_fp->num_locals) -  Pike_fatal("Sp whacked!\n"); -  }); -  +     FETCH;    JUMP_DONE;   });      #if 0   /* This opcode needs mending if it is to work with machine code. */   OPCODE0_JUMP(F_BREAKPOINT, "breakpoint", 0, {    extern void o_breakpoint(void);    o_breakpoint();    DO_JUMP_TO(PROG_COUNTER-1);