pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: interpret_functions.h,v 1.118 2002/11/13 12:38:29 grubba Exp $ + || $Id: interpret_functions.h,v 1.119 2002/11/14 18:09:12 grubba Exp $   */      /*    * Opcode definitions for the interpreter.    */      #include "global.h"      #undef CJUMP   #undef AUTO_BIGNUM_LOOP_TEST
pike.git/src/interpret_functions.h:2126:    add_ref(new_frame->context.prog); \    if(new_frame->context.parent) \    add_ref(new_frame->context.parent); \    Pike_fp=new_frame; \    new_frame->flags=PIKE_FRAME_RETURN_INTERNAL | XFLAGS; \    \    FETCH; \    DONE; \   }while(0)    -  +    /* Assume that the number of arguments is correct */   OPCODE1_JUMP(F_COND_RECUR, "recur if not overloaded", I_PC_AT_NEXT, { -  +  struct program *p = Pike_fp->current_object->prog;    PIKE_OPCODE_T *addr = (PIKE_OPCODE_T *)(((INT32 *)PROG_COUNTER) + 1);    Pike_fp->pc=addr;    -  /* FIXME: -  * this test should actually test if this function is -  * overloaded or not. Currently it only tests if -  * this context is inherited or not. +  /* Test if the function is overloaded. +  * +  * Note: The second part of the test is sufficient, but +  * the since first case is much simpler to test and +  * is common, it should offer a speed improvement. +  * /grubba 2002-11-14    */ -  if(Pike_fp->current_object->prog != Pike_fp->context.prog) +  if((p != Pike_fp->context.prog) && +  (p->inherits[p->identifier_references[Pike_fp->context.identifier_level + +  arg1].inherit_offset].prog != +  Pike_fp->context.prog))    {    PIKE_OPCODE_T *faddr = PROG_COUNTER+GET_JUMP();    ptrdiff_t num_locals = READ_INCR_BYTE(faddr); /* ignored */    ptrdiff_t 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)))