pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1168:   OPCODE1(F_ASSIGN_ALL_INDICES, "assign[*]", I_UPDATE_SP, {    if(TYPEOF(Pike_sp[-2]) != PIKE_T_ARRAY )    PIKE_ERROR("[*]=", "Destination is not an array.\n", Pike_sp, 1);    assign_array_level_value( Pike_sp[-2].u.array, Pike_sp-1, arg1 );    pop_stack(); /* leaves arr on stack. */   });      OPCODE2(F_APPLY_ASSIGN_LOCAL_AND_POP,    "apply, assign local and pop", I_UPDATE_SP|I_UPDATE_M_SP, {    apply_svalue(&((Pike_fp->context->prog->constants + arg1)->sval), -  DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp))); +  (INT32)(Pike_sp - *--Pike_mark_sp));    free_svalue(Pike_fp->locals+arg2);    move_svalue (Pike_fp->locals + arg2, Pike_sp - 1);    Pike_sp--;   });      OPCODE2(F_APPLY_ASSIGN_LOCAL, "apply, assign local", I_UPDATE_ALL, {    apply_svalue(&((Pike_fp->context->prog->constants + arg1)->sval), -  DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp))); +  (INT32)(Pike_sp - *--Pike_mark_sp));    assign_svalue(Pike_fp->locals+arg2, Pike_sp-1);   });      OPCODE0(F_ASSIGN_AND_POP, "assign and pop", I_UPDATE_SP, {    assign_lvalue(Pike_sp-3, Pike_sp-1);    pop_n_elems(3);   });      OPCODE1(F_ASSIGN_LOCAL_AND_POP, "assign local and pop", I_UPDATE_SP, {    free_svalue(Pike_fp->locals + arg1);
pike.git/src/interpret_functions.h:2221:    push_int(pike_sizeof(Pike_fp->locals+arg1));   });      OPCODE1_ALIAS(F_SSCANF, "sscanf", I_UPDATE_SP, o_sscanf);      #define MKAPPLY(OP,OPCODE,NAME,TYPE, ARG2, ARG3) \    PIKE_CONCAT(OP,_JUMP)(PIKE_CONCAT(F_,OPCODE),NAME, \    I_UPDATE_ALL, { \    LOCAL_VAR(PIKE_OPCODE_T *addr); \   JUMP_SET_TO_PC_AT_NEXT (Pike_fp->return_addr); \ - if((addr=low_mega_apply(TYPE,DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), \ +  if((addr=low_mega_apply(TYPE,(INT32)(Pike_sp - *--Pike_mark_sp), \    ARG2, ARG3))) \   { \    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL; \    DO_JUMP_TO(addr); \   } \   else { \    DO_JUMP_TO_NEXT; \   } \   }); \    \    PIKE_CONCAT(OP,_JUMP)(PIKE_CONCAT3(F_,OPCODE,_AND_POP),NAME " & pop", \    I_UPDATE_ALL, { \    LOCAL_VAR(PIKE_OPCODE_T *addr); \    JUMP_SET_TO_PC_AT_NEXT (Pike_fp->return_addr); \ -  if((addr=low_mega_apply(TYPE, DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), \ +  if((addr=low_mega_apply(TYPE, (INT32)(Pike_sp - *--Pike_mark_sp), \    ARG2, ARG3))) \    { \    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL | PIKE_FRAME_RETURN_POP; \    DO_JUMP_TO(addr); \    }else{ \    pop_stack(); \    DO_JUMP_TO_NEXT; \    } \   }); \    \   PIKE_CONCAT(OP,_RETURN)(PIKE_CONCAT3(F_,OPCODE,_AND_RETURN), \    NAME " & return", \    I_UPDATE_ALL, { \    LOCAL_VAR(PIKE_OPCODE_T *addr); \ -  if((addr = low_mega_apply(TYPE,DO_NOT_WARN( \ -  (INT32)(Pike_sp - *--Pike_mark_sp)), \ +  if((addr = low_mega_apply(TYPE, (INT32)(Pike_sp - *--Pike_mark_sp), \    ARG2,ARG3))) \    { \    DO_IF_DEBUG(Pike_fp->next->pc=0); \    unlink_previous_frame(); \    DO_JUMP_TO(addr); \    }else{ \    DO_DUMB_RETURN; \    } \   })   
pike.git/src/interpret_functions.h:2318:    DO_JUMP_TO(pc); \    }else{ \    DO_DUMB_RETURN; \    } \   })         OPCODE1_JUMP(F_CALL_LFUN , "call lfun", I_UPDATE_ALL, {    LOCAL_VAR(PIKE_OPCODE_T *addr);    JUMP_SET_TO_PC_AT_NEXT (Pike_fp->return_addr); -  if((addr = lower_mega_apply(DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), +  if((addr = lower_mega_apply((INT32)(Pike_sp - *--Pike_mark_sp),    Pike_fp->current_object,    (arg1+Pike_fp->context->identifier_level) )))    {    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL;    DO_JUMP_TO(addr);    }    else    {    DO_JUMP_TO_NEXT;    }
pike.git/src/interpret_functions.h:2350:    }    else    {    DO_JUMP_TO_NEXT;    }    });      OPCODE1_JUMP(F_CALL_LFUN_AND_POP, "call lfun & pop", I_UPDATE_ALL, {    LOCAL_VAR(PIKE_OPCODE_T *addr);    JUMP_SET_TO_PC_AT_NEXT (Pike_fp->return_addr); -  if((addr = lower_mega_apply(DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), +  if((addr = lower_mega_apply((INT32)(Pike_sp - *--Pike_mark_sp),    Pike_fp->current_object,    (arg1+Pike_fp->context->identifier_level))))    {    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL | PIKE_FRAME_RETURN_POP;    DO_JUMP_TO(addr);    }    else    {    pop_stack();    DO_JUMP_TO_NEXT;    }    });      OPCODE1_RETURN(F_CALL_LFUN_AND_RETURN , "call lfun & return", I_UPDATE_ALL, {    LOCAL_VAR(PIKE_OPCODE_T *addr); -  if((addr = lower_mega_apply(DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), +  if((addr = lower_mega_apply((INT32)(Pike_sp - *--Pike_mark_sp),    Pike_fp->current_object,    (arg1+Pike_fp->context->identifier_level))))    {    DO_IF_DEBUG(Pike_fp->next->pc=0);    unlink_previous_frame();    DO_JUMP_TO(addr);    }else{    DO_DUMB_RETURN;    }    });
pike.git/src/interpret_functions.h:2427:    DO_DUMB_RETURN;    }    });      MKAPPLY2(OPCODE1,APPLY,"apply",APPLY_SVALUE_STRICT,    &((Pike_fp->context->prog->constants + arg1)->sval),0);      MKAPPLY(OPCODE0,CALL_FUNCTION,"call function",APPLY_STACK, 0,0);      OPCODE1_JUMP(F_CALL_OTHER,"call other", I_UPDATE_ALL, { -  INT32 args=DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)); +  INT32 args=(INT32)(Pike_sp - *--Pike_mark_sp);    LOCAL_VAR(struct svalue *s);    s = Pike_sp-args;    JUMP_SET_TO_PC_AT_NEXT (Pike_fp->return_addr);    if(TYPEOF(*s) == T_OBJECT)    {    LOCAL_VAR(struct object *o);    LOCAL_VAR(struct program *p);    o = s->u.object;    if((p=o->prog))    {
pike.git/src/interpret_functions.h:2485:    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL;    DO_JUMP_TO(addr);    }    else {    DO_JUMP_TO_NEXT;    }    }   });      OPCODE1_JUMP(F_CALL_OTHER_AND_POP,"call other & pop", I_UPDATE_ALL, { -  INT32 args=DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)); +  INT32 args=(INT32)(Pike_sp - *--Pike_mark_sp);    LOCAL_VAR(struct svalue *s);    s = Pike_sp-args;    JUMP_SET_TO_PC_AT_NEXT (Pike_fp->return_addr);    if(TYPEOF(*s) == T_OBJECT)    {    LOCAL_VAR(struct object *o);    LOCAL_VAR(struct program *p);    o = s->u.object;    if((p=o->prog))    {
pike.git/src/interpret_functions.h:2547:    DO_JUMP_TO(addr);    }    else {    pop_stack();    DO_JUMP_TO_NEXT;    }    }   });      OPCODE1_RETURN(F_CALL_OTHER_AND_RETURN,"call other & return", I_UPDATE_ALL, { -  INT32 args=DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)); +  INT32 args=(INT32)(Pike_sp - *--Pike_mark_sp);    LOCAL_VAR(struct svalue *s);    s = Pike_sp - args;    if(TYPEOF(*s) == T_OBJECT)    {    LOCAL_VAR(struct object *o);    LOCAL_VAR(struct program *p);    o = s->u.object;    if((p=o->prog))    {    p = p->inherits[SUBTYPEOF(*s)].prog;
pike.git/src/interpret_functions.h:2674:    } \   }while(0)   #else   #define DO_CALL_BUILTIN(ARGS) do { \    (*(Pike_fp->context->prog->constants[arg1].sval.u.efun->function))(ARGS); \    } while (0)   #endif      OPCODE1(F_CALL_BUILTIN, "call builtin", I_UPDATE_ALL, {    FAST_CHECK_THREADS_ON_CALL(); -  DO_CALL_BUILTIN(DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp))); +  DO_CALL_BUILTIN((INT32)(Pike_sp - *--Pike_mark_sp));   });      OPCODE1(F_CALL_BUILTIN_AND_POP,"call builtin & pop", I_UPDATE_ALL, {    FAST_CHECK_THREADS_ON_CALL(); -  DO_CALL_BUILTIN(DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp))); +  DO_CALL_BUILTIN((INT32)(Pike_sp - *--Pike_mark_sp));    pop_stack();   });      OPCODE1_RETURN(F_CALL_BUILTIN_AND_RETURN,"call builtin & return", I_UPDATE_ALL, {    FAST_CHECK_THREADS_ON_CALL(); -  DO_CALL_BUILTIN(DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp))); +  DO_CALL_BUILTIN((INT32)(Pike_sp - *--Pike_mark_sp));    DO_DUMB_RETURN;   });         OPCODE1(F_MARK_CALL_BUILTIN, "mark, call builtin", I_UPDATE_ALL, {    FAST_CHECK_THREADS_ON_CALL();    DO_CALL_BUILTIN(0);   });      OPCODE1(F_MARK_CALL_BUILTIN_AND_POP, "mark, call builtin & pop", 0, {
pike.git/src/interpret_functions.h:2730:   });      OPCODE1(F_CALL_BUILTIN1_AND_POP, "call builtin1 & pop", I_UPDATE_ALL, {    FAST_CHECK_THREADS_ON_CALL();    DO_CALL_BUILTIN(1);    pop_stack();   });      OPCODE1(F_LTOSVAL_CALL_BUILTIN_AND_ASSIGN, "ltosval, call builtin & assign",    I_UPDATE_ALL, { -  INT32 args = DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)); +  INT32 args = (INT32)(Pike_sp - *--Pike_mark_sp);    ONERROR uwp;       /* Give other threads a chance to run now, before we temporarily    * clear the svalue, in case another thread looks at it. */    FAST_CHECK_THREADS_ON_CALL();       /* FIXME: Assert that args > 0 */       STACK_LEVEL_START(args+2);   
pike.git/src/interpret_functions.h:2776:    STACK_LEVEL_CHECK(3);    free_svalue(Pike_sp-3);    free_svalue(Pike_sp-2);    move_svalue(Pike_sp - 3, Pike_sp - 1);    Pike_sp-=2;    STACK_LEVEL_DONE(1);   });      OPCODE1(F_LTOSVAL_CALL_BUILTIN_AND_ASSIGN_POP,    "ltosval, call builtin, assign & pop", I_UPDATE_ALL, { -  INT32 args = DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)); +  INT32 args = (INT32)(Pike_sp - *--Pike_mark_sp);    ONERROR uwp;       /* Give other threads a chance to run now, before we temporarily    * clear the svalue, in case another thread looks at it. */    FAST_CHECK_THREADS_ON_CALL();       /* FIXME: Assert that args > 0 */       STACK_LEVEL_START(args+2);   
pike.git/src/interpret_functions.h:2823:    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; \    struct pike_frame *new_frame; \ -  INT32 args = DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)); \ +  INT32 args = (INT32)(Pike_sp - *--Pike_mark_sp); \    \    FAST_CHECK_THREADS_ON_CALL(); \    check_stack(256); \    \    new_frame=alloc_pike_frame(); \    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(); \
pike.git/src/interpret_functions.h:2909:    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))    {    ptrdiff_t num_locals;    PIKE_OPCODE_T *faddr;    PIKE_OPCODE_T *addr2; -  INT32 args = DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)); +  INT32 args = (INT32)(Pike_sp - *--Pike_mark_sp);    JUMP_SET_TO_PC_AT_NEXT (faddr);    faddr += GET_JUMP();       if((addr2 = lower_mega_apply(args,    Pike_fp->current_object,    (arg1+Pike_fp->context->identifier_level))))    {    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL;    addr = addr2;    }
pike.git/src/interpret_functions.h:2942:   /* Ugly code duplication */   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, {    PIKE_OPCODE_T *addr; -  INT32 args = DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)); +  INT32 args = (INT32)(Pike_sp - *--Pike_mark_sp);       FAST_CHECK_THREADS_ON_CALL();       JUMP_SET_TO_PC_AT_NEXT (addr);    addr += GET_JUMP();    addr += ENTRY_PROLOGUE_SIZE;    SET_PROG_COUNTER(addr);       if(Pike_sp-args != Pike_fp->locals)    {