pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /* -  * $Id: interpret_functions.h,v 1.97 2001/10/05 01:30:13 hubbe Exp $ +  * $Id: interpret_functions.h,v 1.98 2001/12/16 02:49:39 mast Exp $    *    * Opcode definitions for the interpreter.    */      #include "global.h"      #undef CJUMP   #undef AUTO_BIGNUM_LOOP_TEST   #undef LOOP   #undef COMPARISON
pike.git/src/interpret_functions.h:985:    tmp.u.string=Pike_fp->context.prog->strings[arg1];    tmp.subtype=1;    Pike_sp->type=PIKE_T_INT;    Pike_sp++;    index_no_free(Pike_sp-1,Pike_fp->locals+arg2, &tmp);    print_return_value();       /* Fall through */       OPCODE0_TAILJUMP(F_BRANCH_WHEN_ZERO, "branch if zero", { -  if(!IS_ZERO(Pike_sp-1)) +  if(!UNSAFE_IS_ZERO(Pike_sp-1))    {    SKIPJUMP();    }else{    DOJUMP();    }    pop_stack();    });   });         OPCODE0_JUMP(F_BRANCH_WHEN_NON_ZERO, "branch if not zero", { -  if(IS_ZERO(Pike_sp-1)) +  if(UNSAFE_IS_ZERO(Pike_sp-1))    {    SKIPJUMP();    }else{    DOJUMP();    }    pop_stack();   });      OPCODE1_JUMP(F_BRANCH_IF_TYPE_IS_NOT, "branch if type is !=", {   /* fprintf(stderr,"******BRANCH IF TYPE IS NOT***** %s\n",get_name_of_type(arg1)); */    if(Pike_sp[-1].type == T_OBJECT &&    Pike_sp[-1].u.object->prog)    {    int fun=FIND_LFUN(Pike_sp[-1].u.object->prog, LFUN__IS_TYPE);    if(fun != -1)    {   /* fprintf(stderr,"******OBJECT OVERLOAD IN TYPEP***** %s\n",get_name_of_type(arg1)); */    push_text(get_name_of_type(arg1));    apply_low(Pike_sp[-2].u.object, fun, 1); -  arg1=IS_ZERO(Pike_sp-1) ? T_FLOAT : T_OBJECT ; +  arg1=UNSAFE_IS_ZERO(Pike_sp-1) ? T_FLOAT : T_OBJECT ;    pop_stack();    }    }    if(Pike_sp[-1].type == arg1)    {    SKIPJUMP();    }else{    DOJUMP();    }    pop_stack();   });      OPCODE1_JUMP(F_BRANCH_IF_LOCAL, "branch if local", { -  if(IS_ZERO(Pike_fp->locals + arg1)) +  if(UNSAFE_IS_ZERO(Pike_fp->locals + arg1))    {    SKIPJUMP();    }else{    DOJUMP();    }   });      OPCODE1_JUMP(F_BRANCH_IF_NOT_LOCAL, "branch if !local", { -  if(!IS_ZERO(Pike_fp->locals + arg1)) +  if(!UNSAFE_IS_ZERO(Pike_fp->locals + arg1))    {    SKIPJUMP();    }else{    DOJUMP();    }   });      #define CJUMP(X, DESC, Y) \    OPCODE0_JUMP(X, DESC, { \    if(Y(Pike_sp-2,Pike_sp-1)) { \
pike.git/src/interpret_functions.h:1066:    })      CJUMP(F_BRANCH_WHEN_EQ, "branch if ==", is_eq);   CJUMP(F_BRANCH_WHEN_NE, "branch if !=", !is_eq);   CJUMP(F_BRANCH_WHEN_LT, "branch if <", is_lt);   CJUMP(F_BRANCH_WHEN_LE, "branch if <=", !is_gt);   CJUMP(F_BRANCH_WHEN_GT, "branch if >", is_gt);   CJUMP(F_BRANCH_WHEN_GE, "branch if >=", !is_lt);      OPCODE0_JUMP(F_BRANCH_AND_POP_WHEN_ZERO, "branch & pop if zero", { -  if(!IS_ZERO(Pike_sp-1)) +  if(!UNSAFE_IS_ZERO(Pike_sp-1))    {    SKIPJUMP();    }else{    DOJUMP();    pop_stack();    }   });      OPCODE0_JUMP(F_BRANCH_AND_POP_WHEN_NON_ZERO, "branch & pop if !zero", { -  if(IS_ZERO(Pike_sp-1)) +  if(UNSAFE_IS_ZERO(Pike_sp-1))    {    SKIPJUMP();    }else{    DOJUMP();    pop_stack();    }   });      OPCODE0_JUMP(F_LAND, "&&", { -  if(!IS_ZERO(Pike_sp-1)) +  if(!UNSAFE_IS_ZERO(Pike_sp-1))    {    SKIPJUMP();    pop_stack();    }else{    DOJUMP();    }   });      OPCODE0_JUMP(F_LOR, "||", { -  if(IS_ZERO(Pike_sp-1)) +  if(UNSAFE_IS_ZERO(Pike_sp-1))    {    SKIPJUMP();    pop_stack();    }else{    DOJUMP();    }   });      OPCODE0_JUMP(F_EQ_OR, "==||", {    if(!is_eq(Pike_sp-2,Pike_sp-1))
pike.git/src/interpret_functions.h:1316:    {    pop_n_elems(Pike_sp-1 - (Pike_fp->locals + arg1));    }else{    push_svalue(Pike_fp->locals + arg1);    }    DO_DUMB_RETURN;   });         OPCODE0_RETURN(F_RETURN_IF_TRUE,"return if true",{ -  if(!IS_ZERO(Pike_sp-1)) DO_RETURN; +  if(!UNSAFE_IS_ZERO(Pike_sp-1)) DO_RETURN;    pop_stack();   });      OPCODE0_RETURN(F_RETURN_1,"return 1",{    push_int(1);    DO_RETURN;   });      OPCODE0_RETURN(F_RETURN_0,"return 0",{    push_int(0);
pike.git/src/interpret_functions.h:1372:      OPCODE0(F_NOT, "!", {    switch(Pike_sp[-1].type)    {    case PIKE_T_INT:    Pike_sp[-1].u.integer =! Pike_sp[-1].u.integer;    break;       case PIKE_T_FUNCTION:    case PIKE_T_OBJECT: -  if(IS_ZERO(Pike_sp-1)) +  if(UNSAFE_IS_ZERO(Pike_sp-1))    {    pop_stack();    push_int(1);    }else{    pop_stack();    push_int(0);    }    break;       default: