pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: interpret.c,v 1.77 1998/04/16 01:19:37 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.78 1998/04/16 21:32:01 hubbe Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "error.h"   #include "language.h"   #include "stralloc.h"   #include "constants.h"
pike.git/src/interpret.c:535: Inside #if defined(DEBUG)
      if(d_flag > 9) do_debug();       backlogp++;    if(backlogp >= BACKLOG) backlogp=0;       if(backlog[backlogp].program)    free_program(backlog[backlogp].program);       backlog[backlogp].program=fp->context.prog; -  fp->context.prog->refs++; +  add_ref(fp->context.prog);    backlog[backlogp].instruction=instr;    backlog[backlogp].arg=0;    backlog[backlogp].pc=pc;    }       if(t_flag > 2)    {    char *file, *f;    INT32 linep;   
pike.git/src/interpret.c:618:       CASE(F_FLOAT);    sp->type=T_FLOAT;    MEMCPY((void *)&sp->u.float_number, pc, sizeof(FLOAT_TYPE));    pc+=sizeof(FLOAT_TYPE);    sp++;    break;       CASE(F_LFUN);    sp->u.object=fp->current_object; -  fp->current_object->refs++; +  add_ref(fp->current_object);    sp->subtype=GET_ARG()+fp->context.identifier_level;    sp->type=T_FUNCTION;    sp++;    print_return_value();    break;       /* The not so basic 'push value' instructions */    CASE(F_GLOBAL);    low_object_index_no_free(sp,    fp->current_object,
pike.git/src/interpret.c:1322:    MEMMOVE(sp-args+1,sp-args,args*sizeof(struct svalue));    sp++;    sp[-args-1].type=T_INT;    }else{    free_svalue(sp-args-1);    }    /* More stack sabotage */    sp[-args-1].u.object=fp->current_object;    sp[-args-1].subtype=GET_ARG()+fp->context.identifier_level;    sp[-args-1].type=T_FUNCTION; -  fp->current_object->refs++; +  add_ref(fp->current_object);       return args+1;    }       CASE(F_RETURN_LOCAL);    instr=GET_ARG();    pop_n_elems(sp-1 - (fp->locals+instr));    print_return_value();    goto do_return;   
pike.git/src/interpret.c:1782: Inside #if defined(PROFILING)
  #ifdef PROFILING    function->num_calls++;   #endif       new_frame.locals = sp - args;    new_frame.args = args;    new_frame.fun = fun;    new_frame.current_storage = o->storage+new_frame.context.storage_offset;    new_frame.pc = 0;    -  new_frame.current_object->refs++; -  new_frame.context.prog->refs++; -  if(new_frame.context.parent) new_frame.context.parent->refs++; +  add_ref(new_frame.current_object); +  add_ref(new_frame.context.prog); +  if(new_frame.context.parent) add_ref(new_frame.context.parent);       if(t_flag)    {    char buf[50];    init_buf();    sprintf(buf,"%lx->",(long)o);    my_strcat(buf);    my_strcat(function->name->str);    do_trace_call(args);    }
pike.git/src/interpret.c:1985:    new_frame.locals = evaluator_stack;    new_frame.args = 0;    new_frame.num_args=0;    new_frame.num_locals=0;    new_frame.fun = -1;    new_frame.pc = 0;    new_frame.current_storage=o->storage;    new_frame.context.parent=0;    fp = & new_frame;    -  new_frame.current_object->refs++; -  new_frame.context.prog->refs++; +  add_ref(new_frame.current_object); +  add_ref(new_frame.context.prog);       if(SETJMP(tmp))    {    ret=1;    }else{    int tmp=eval_instruction(o->prog->program + offset);    if(tmp!=-1) mega_apply(APPLY_STACK, tmp, 0,0);      #ifdef DEBUG    if(sp<evaluator_stack)