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.125 2003/01/06 14:39:03 grubba Exp $ + || $Id: interpret_functions.h,v 1.126 2003/01/09 15:21:26 grubba Exp $   */      /*    * Opcode definitions for the interpreter.    */      #include "global.h"      #undef CJUMP   #undef AUTO_BIGNUM_LOOP_TEST
pike.git/src/interpret_functions.h:99:   #endif      #ifndef OVERRIDE_JUMPS      #undef GET_JUMP   #undef SKIPJUMP   #undef DOJUMP      #ifdef PIKE_DEBUG    - #define GET_JUMP() (backlog[backlogp].arg=(\ -  (t_flag>3 ? sprintf(trace_buffer, "- Target = %+ld\n", \ -  (long)LOW_GET_JUMP()), \ -  write_to_stderr(trace_buffer,strlen(trace_buffer)) : 0), \ + #define GET_JUMP() (backlog[backlogp].arg=( \ +  (Pike_interpreter.trace_level>3 ? \ +  sprintf(trace_buffer, "- Target = %+ld\n", \ +  (long)LOW_GET_JUMP()), \ +  write_to_stderr(trace_buffer,strlen(trace_buffer)) : 0), \    LOW_GET_JUMP()))      #define SKIPJUMP() (GET_JUMP(), LOW_SKIPJUMP())      #else /* !PIKE_DEBUG */      #define GET_JUMP() LOW_GET_JUMP()   #define SKIPJUMP() LOW_SKIPJUMP()      #endif /* PIKE_DEBUG */
pike.git/src/interpret_functions.h:149:   #undef DO_DUMB_RETURN   #define DO_DUMB_RETURN { \    if(Pike_fp -> flags & PIKE_FRAME_RETURN_INTERNAL) \    { \    int f=Pike_fp->flags; \    if(f & PIKE_FRAME_RETURN_POP) \    low_return_pop(); \    else \    low_return(); \    \ -  DO_IF_DEBUG(if (t_flag) \ +  DO_IF_DEBUG(if (Pike_interpreter.trace_level) \    fprintf(stderr, "Returning to 0x%p\n", \    Pike_fp->pc)); \    DO_JUMP_TO(Pike_fp->pc); \    } \ -  DO_IF_DEBUG(if (t_flag) \ +  DO_IF_DEBUG(if (Pike_interpreter.trace_level) \    fprintf(stderr, "Inter return\n")); \    INTER_RETURN; \   }      #undef DO_RETURN   #ifndef PIKE_DEBUG   #define DO_RETURN DO_DUMB_RETURN   #else   #define DO_RETURN { \    if(d_flag>3) do_gc(); \
pike.git/src/interpret_functions.h:2008:    DO_DUMB_RETURN;    }   });      #undef DO_CALL_BUILTIN   #ifdef PIKE_DEBUG   #define DO_CALL_BUILTIN(ARGS) do { \    int args=(ARGS); \    struct svalue *expected_stack=Pike_sp-args; \    struct svalue *s=&Pike_fp->context.prog->constants[arg1].sval; \ -  if(t_flag>1) \ +  if(Pike_interpreter.trace_level>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) \ -  Pike_fatal("Function popped too many arguments: %s\n", \ +  Pike_fatal("Function popped too many arguments: %s\n", \    s->u.efun->name->str); \    if(Pike_sp>expected_stack+1) \    Pike_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_fatal("Non-void function returned without return value " \ +  Pike_fatal("Non-void function returned without return value " \    "on stack: %s %d\n", \    s->u.efun->name->str,s->u.efun->may_return_void); \    if(Pike_sp==expected_stack+1 && s->u.efun->may_return_void) \    Pike_fatal("Void function returned with a value on the stack: %s %d\n", \    s->u.efun->name->str, s->u.efun->may_return_void); \    } \ -  if(t_flag>1 && Pike_sp>expected_stack) trace_return_value(); \ +  if(Pike_interpreter.trace_level>1 && Pike_sp>expected_stack) \ +  trace_return_value(); \   }while(0)   #else   #define DO_CALL_BUILTIN(ARGS) \   (*(Pike_fp->context.prog->constants[arg1].sval.u.efun->function))(ARGS)   #endif      OPCODE1(F_CALL_BUILTIN, "call builtin", 0, {    DO_CALL_BUILTIN(DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)));   });   
pike.git/src/interpret_functions.h:2110:    args = READ_INCR_BYTE(addr); \    addr += ENTRY_PROLOGUE_SIZE; \    \    new_frame->num_args = new_frame->args = args; \    new_frame->locals=new_frame->save_sp=new_frame->expendible=Pike_sp-args; \    new_frame->save_mark_sp = new_frame->mark_sp_base = Pike_mark_sp; \    \    push_zeroes(new_frame->num_locals - args); \    \    DO_IF_DEBUG({ \ -  if(t_flag > 3) \ +  if(Pike_interpreter.trace_level > 3) \    fprintf(stderr,"- Allocating %d extra locals.\n", \    new_frame->num_locals - new_frame->num_args); \    }); \    \    \    SET_PROG_COUNTER(addr); \    new_frame->fun=Pike_fp->fun; \    DO_IF_PROFILING( new_frame->ident=Pike_fp->ident ); \    new_frame->current_storage=Pike_fp->current_storage; \    if(Pike_fp->scope) add_ref(new_frame->scope=Pike_fp->scope); \