pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /* -  * $Id: interpret_functions.h,v 1.65 2001/06/29 19:48:49 hubbe Exp $ +  * $Id: interpret_functions.h,v 1.66 2001/07/02 04:09:48 hubbe Exp $    *    * Opcode definitions for the interpreter.    */      #include "global.h"      OPCODE0(F_UNDEFINED,"push UNDEFINED")    push_int(0);    Pike_sp[-1].subtype=NUMBER_UNDEFINED;   BREAK;
pike.git/src/interpret_functions.h:855:   OPCODE0_JUMP(F_BRANCH_WHEN_NON_ZERO,"branch if not zero")    if(IS_ZERO(Pike_sp-1))    {    SKIPJUMP();    }else{    DOJUMP();    }    pop_stack();   BREAK    + 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 ; +  pop_stack(); +  } +  } +  if(Pike_sp[-1].type == arg1) +  { +  SKIPJUMP(); +  }else{ +  DOJUMP(); +  } +  pop_stack(); + BREAK +    OPCODE1_JUMP(F_BRANCH_IF_LOCAL,"branch if local")    if(IS_ZERO(Pike_fp->locals + arg1))    {    SKIPJUMP();    }else{    DOJUMP();    }   BREAK;       CASE(F_BRANCH_IF_NOT_LOCAL);
pike.git/src/interpret_functions.h:1652:    int args=(ARGS); \    struct svalue *expected_stack=Pike_sp-args; \    struct svalue *s=&Pike_fp->context.prog->constants[arg1].sval; \    if(t_flag>1) \    { \    init_buf(); \    describe_svalue(s, 0,0); \    do_trace_call(args); \    } \    (*(s->u.efun->function))(args); \ +  s->u.efun->runs++; \    if(Pike_sp != expected_stack + !s->u.efun->may_return_void) \    { \    if(Pike_sp < expected_stack) \    fatal("Function popped too many arguments: %s\n", \    s->u.efun->name->str); \    if(Pike_sp>expected_stack+1) \    fatal("Function left %d droppings on stack: %s\n", \    Pike_sp-(expected_stack+1), \    s->u.efun->name->str); \    if(Pike_sp == expected_stack && !s->u.efun->may_return_void) \
pike.git/src/interpret_functions.h:1718:   BREAK;      OPCODE1(F_MARK_CALL_BUILTIN_AND_RETURN,"mark, call builtin & return")   {    DO_CALL_BUILTIN(0);    goto do_dumb_return;   }   BREAK;       + OPCODE1(F_CALL_BUILTIN1,"call builtin 1") + { +  DO_CALL_BUILTIN(1); + } + BREAK;    -  + OPCODE1(F_CALL_BUILTIN1_AND_POP,"call builtin1 & pop") + { +  DO_CALL_BUILTIN(1); +  pop_stack(); + } + BREAK; +    /* Assume that the number of arguments is correct */   OPCODE1_JUMP(F_COND_RECUR,"recur if not overloaded")   {    /* 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)    {