pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /* -  * $Id: interpret_functions.h,v 1.27 2000/07/29 06:31:06 hubbe Exp $ +  * $Id: interpret_functions.h,v 1.28 2000/08/07 16:12:39 grubba Exp $    *    * Opcode definitions for the interpreter.    */      OPCODE0(F_UNDEFINED,"push UNDEFINED")    push_int(0);    Pike_sp[-1].subtype=NUMBER_UNDEFINED;   BREAK;      OPCODE0(F_CONST0, "push 0")
pike.git/src/interpret_functions.h:978:    pc+=EXTRACT_INT(pc);    Pike_sp[-1].u.integer++;    }else{    SKIPJUMP();    }    break;    }       CASE(F_APPLY_AND_RETURN);    { -  INT32 args=Pike_sp - *--Pike_mark_sp; +  INT32 args = DO_NOT_WARN(Pike_sp - *--Pike_mark_sp);   /* fprintf(stderr,"%p >= %p\n",Pike_fp->expendible,Pike_sp-args); */    if(Pike_fp->expendible >= Pike_sp-args)    {   /* fprintf(stderr,"NOT EXPENDIBLE!\n"); */    MEMMOVE(Pike_sp-args+1,Pike_sp-args,args*sizeof(struct svalue));    Pike_sp++;    Pike_sp[-args-1].type=PIKE_T_INT;    }    /* We sabotage the stack here */    assign_svalue(Pike_sp-args-1,&Pike_fp->context.prog->constants[GET_ARG()].sval);    return args+1;    }      OPCODE1(F_CALL_LFUN_AND_RETURN,"call lfun & return")   { -  INT32 args=Pike_sp - *--Pike_mark_sp; +  INT32 args = DO_NOT_WARN(Pike_sp - *--Pike_mark_sp);       if(Pike_fp->expendible >= Pike_sp-args)    {    MEMMOVE(Pike_sp-args+1,Pike_sp-args,args*sizeof(struct svalue));    Pike_sp++;    Pike_sp[-args-1].type=PIKE_T_INT;    }else{    free_svalue(Pike_sp-args-1);    }    /* More stack sabotage */
pike.git/src/interpret_functions.h:1460:    push_int(pike_sizeof(Pike_fp->locals+arg1));   BREAK;      OPCODE1(F_SSCANF, "sscanf")    o_sscanf(arg1);   BREAK;      OPCODE1(F_CALL_LFUN,"call lfun")    apply_low(Pike_fp->current_object,    arg1+Pike_fp->context.identifier_level, -  Pike_sp - *--Pike_mark_sp); +  DO_NOT_WARN(Pike_sp - *--Pike_mark_sp));   BREAK;      OPCODE1(F_CALL_LFUN_AND_POP,"call lfun & pop")    apply_low(Pike_fp->current_object,    arg1+Pike_fp->context.identifier_level, -  Pike_sp - *--Pike_mark_sp); +  DO_NOT_WARN(Pike_sp - *--Pike_mark_sp));    pop_stack();   BREAK;      OPCODE1(F_MARK_APPLY,"mark apply")    strict_apply_svalue(Pike_fp->context.prog->constants + arg1, 0);   BREAK;      OPCODE1(F_MARK_APPLY_POP,"mark, apply & pop")    strict_apply_svalue(Pike_fp->context.prog->constants + arg1, 0);    pop_stack();   BREAK;       CASE(F_APPLY); -  strict_apply_svalue(Pike_fp->context.prog->constants + GET_ARG(), Pike_sp - *--Pike_mark_sp ); +  strict_apply_svalue(Pike_fp->context.prog->constants + GET_ARG(), +  DO_NOT_WARN(Pike_sp - *--Pike_mark_sp ));    break;       CASE(F_APPLY_AND_POP); -  strict_apply_svalue(Pike_fp->context.prog->constants + GET_ARG(), Pike_sp - *--Pike_mark_sp ); +  strict_apply_svalue(Pike_fp->context.prog->constants + GET_ARG(), +  DO_NOT_WARN(Pike_sp - *--Pike_mark_sp ));    pop_stack();    break;       CASE(F_CALL_FUNCTION);    mega_apply(APPLY_STACK,Pike_sp - *--Pike_mark_sp,0,0);    break;       CASE(F_CALL_FUNCTION_AND_RETURN);    { -  INT32 args=Pike_sp - *--Pike_mark_sp; +  INT32 args = DO_NOT_WARN(Pike_sp - *--Pike_mark_sp);    if(!args)    PIKE_ERROR("`()", "Too few arguments.\n", Pike_sp, 0);    switch(Pike_sp[-args].type)    {    case PIKE_T_INT:    if (!Pike_sp[-args].u.integer) { -  PIKE_ERROR("`()", "Attempt to call the NULL-value\n", Pike_sp, args); +  PIKE_ERROR("`()", "Attempt to call the NULL-value\n", +  Pike_sp, args);    }    case PIKE_T_STRING:    case PIKE_T_FLOAT:    case PIKE_T_MAPPING:    case PIKE_T_MULTISET: -  PIKE_ERROR("`()", "Attempt to call a non-function value.\n", Pike_sp, args); +  PIKE_ERROR("`()", "Attempt to call a non-function value.\n", +  Pike_sp, args);    }    return args;    }         /* Assume that the number of arguments is correct */   OPCODE0_JUMP(F_RECUR,"recur")   { -  int x,num_locals,args; +  int x; +  INT32 num_locals, args;    char *addr;    struct svalue *expendible=Pike_fp->expendible;    struct svalue *locals=Pike_fp->locals;    struct svalue *save_sp, **save_mark_sp;       fast_check_threads_etc(6);    check_c_stack(8192);    check_stack(256);    -  save_sp=Pike_fp->expendible=Pike_fp->locals=*--Pike_mark_sp; -  args=Pike_sp-Pike_fp->locals; -  save_mark_sp=Pike_mark_sp; +  save_sp = Pike_fp->expendible = Pike_fp->locals = *--Pike_mark_sp; +  args = DO_NOT_WARN(Pike_sp - Pike_fp->locals); +  save_mark_sp = Pike_mark_sp;       addr=pc+EXTRACT_INT(pc);    num_locals=EXTRACT_UCHAR(addr-2);      #ifdef PIKE_DEBUG    if(args != EXTRACT_UCHAR(addr-1)) -  fatal("Wrong number of arguments in F_RECUR %d!=%d\n",args,EXTRACT_UCHAR(addr-1)); +  fatal("Wrong number of arguments in F_RECUR %d!=%d\n", +  args, EXTRACT_UCHAR(addr-1));   #endif       clear_svalues(Pike_sp, num_locals - args);    Pike_sp += num_locals - args;       x=eval_instruction(addr);   #ifdef PIKE_DEBUG    if(Pike_mark_sp < save_mark_sp)    fatal("mark Pike_sp underflow in F_RECUR.\n");   #endif
pike.git/src/interpret_functions.h:1567: Inside #if defined(PIKE_DEBUG)
  #ifdef PIKE_DEBUG    if(Pike_sp != save_sp+1)    fatal("Stack whack in F_RECUR Pike_sp=%p, expected=%p\n",Pike_sp,save_sp+1);   #endif   }   BREAK      /* Assume that the number of arguments is correct */   OPCODE1_JUMP(F_COND_RECUR,"recur if not overloaded")   { -  int x,num_locals,args; +  int x; +  INT32 num_locals,args;    char *addr;       struct svalue *expendible=Pike_fp->expendible;    struct svalue *locals=Pike_fp->locals;    struct svalue *save_sp, **save_mark_sp;       /* FIXME:    * this test should actually test if this function is    * overloaded or not. Currently it only tests if    * this context is inherited or not.    */    if(Pike_fp->current_object->prog != Pike_fp->context.prog)    {    apply_low(Pike_fp->current_object,    arg1+Pike_fp->context.identifier_level, -  Pike_sp - *--Pike_mark_sp); +  DO_NOT_WARN(Pike_sp - *--Pike_mark_sp));    pc+=sizeof(INT32);    }else{    fast_check_threads_etc(6);    check_c_stack(8192);    check_stack(256);    -  save_sp=Pike_fp->expendible=Pike_fp->locals=*--Pike_mark_sp; -  args=Pike_sp-Pike_fp->locals; -  save_mark_sp=Pike_mark_sp; +  save_sp = Pike_fp->expendible = Pike_fp->locals = *--Pike_mark_sp; +  args = DO_NOT_WARN(Pike_sp - Pike_fp->locals); +  save_mark_sp = Pike_mark_sp;       addr=pc+EXTRACT_INT(pc);    num_locals=EXTRACT_UCHAR(addr-2);      #ifdef PIKE_DEBUG    if(args != EXTRACT_UCHAR(addr-1))    fatal("Wrong number of arguments in F_RECUR %d!=%d\n",args,EXTRACT_UCHAR(addr-1));   #endif       clear_svalues(Pike_sp, num_locals - args);
pike.git/src/interpret_functions.h:1633:    fatal("Stack whack in F_RECUR Pike_sp=%p, expected=%p\n",Pike_sp,save_sp+1);   #endif    }   }   BREAK      /* Assume that the number of arguments is correct */   /* FIXME: adjust Pike_mark_sp */   OPCODE0_JUMP(F_TAIL_RECUR,"tail recursion")   { -  int x,num_locals; +  int x; +  INT32 num_locals;    char *addr; -  int args=Pike_sp - *--Pike_mark_sp; +  int args = DO_NOT_WARN(Pike_sp - *--Pike_mark_sp);       fast_check_threads_etc(6);       addr=pc+EXTRACT_INT(pc);    num_locals=EXTRACT_UCHAR(addr-2);         #ifdef PIKE_DEBUG    if(args != EXTRACT_UCHAR(addr-1)) -  fatal("Wrong number of arguments in F_TAIL_RECUR %d != %d\n",args,EXTRACT_UCHAR(addr-1)); +  fatal("Wrong number of arguments in F_TAIL_RECUR %d != %d\n", +  args, EXTRACT_UCHAR(addr-1));   #endif       if(Pike_sp-args != Pike_fp->locals)    {    assign_svalues(Pike_fp->locals, Pike_sp-args, args, BIT_MIXED);    pop_n_elems(Pike_sp - (Pike_fp->locals + args));    }       clear_svalues(Pike_sp, num_locals - args);    Pike_sp += num_locals - args;      #ifdef PIKE_DEBUG    if(Pike_sp != Pike_fp->locals + Pike_fp->num_locals)    fatal("Sp whacked!\n");   #endif       pc=addr;   }   BREAK