pike.git / src / interpreter.h

version» Context lines:

pike.git/src/interpreter.h:2:   #undef GET_ARG2      #ifdef PIKE_DEBUG      #define GET_ARG() (backlog[backlogp].arg=(\    instr=prefix,\    prefix=0,\    instr+=EXTRACT_UCHAR(pc++),\    (t_flag>3 ? sprintf(trace_buffer,"- Arg = %ld\n",(long)instr),write_to_stderr(trace_buffer,strlen(trace_buffer)) : 0),\    instr)) +    #define GET_ARG2() (\ -  instr=EXTRACT_UCHAR(pc++),\ +  instr=prefix2,\ +  prefix2=0,\ +  instr+=EXTRACT_UCHAR(pc++),\    (t_flag>3 ? sprintf(trace_buffer,"- Arg2= %ld\n",(long)instr),write_to_stderr(trace_buffer,strlen(trace_buffer)) : 0),\    instr)      #else   #define GET_ARG() (instr=prefix,prefix=0,instr+EXTRACT_UCHAR(pc++)) - #define GET_ARG2() EXTRACT_UCHAR(pc++) + #define GET_ARG2() (instr=prefix2,prefix2=0,instr+EXTRACT_UCHAR(pc++))   #endif      static int eval_instruction(unsigned char *pc)   { -  unsigned INT32 accumulator=0,instr, prefix=0; +  unsigned INT32 prefix2=0,instr, prefix=0;    debug_malloc_touch(Pike_fp);    while(1)    {    Pike_fp->pc = pc;    instr=EXTRACT_UCHAR(pc++);      #ifdef PIKE_DEBUG    if(d_flag)    {   #ifdef _REENTRANT
pike.git/src/interpreter.h:41: Inside #if defined(PIKE_DEBUG)
   Pike_sp[1].type=99;    Pike_sp[2].type=99;    Pike_sp[3].type=99;       if(Pike_sp<Pike_evaluator_stack || Pike_mark_sp < Pike_mark_stack || Pike_fp->locals>Pike_sp)    fatal("Stack error (generic).\n");       if(Pike_sp > Pike_evaluator_stack+Pike_stack_size)    fatal("Stack error (overflow).\n");    -  if(Pike_fp->fun>=0 && Pike_fp->current_object->prog && +  if(/* Pike_fp->fun>=0 && */ Pike_fp->current_object->prog &&    Pike_fp->locals+Pike_fp->num_locals > Pike_sp)    fatal("Stack error (stupid!).\n");       if(recoveries && Pike_sp-Pike_evaluator_stack < recoveries->Pike_sp)    fatal("Stack error (underflow).\n");       if(Pike_mark_sp > Pike_mark_stack && Pike_mark_sp[-1] > Pike_sp)    fatal("Stack error (underflow?)\n");       if(d_flag > 9) do_debug();
pike.git/src/interpreter.h:117:    CASE(F_PREFIX_768); prefix+=768; break;    CASE(F_PREFIX_1024); prefix+=1024; break;    CASE(F_PREFIX_24BITX256);    prefix+=EXTRACT_UCHAR(pc++)<<24;    CASE(F_PREFIX_WORDX256);    prefix+=EXTRACT_UCHAR(pc++)<<16;    CASE(F_PREFIX_CHARX256);    prefix+=EXTRACT_UCHAR(pc++)<<8;    break;    -  CASE(F_LDA); accumulator=GET_ARG(); break; +  /* Support to allow large arguments */ +  CASE(F_PREFIX2_256); prefix2+=256; break; +  CASE(F_PREFIX2_512); prefix2+=512; break; +  CASE(F_PREFIX2_768); prefix2+=768; break; +  CASE(F_PREFIX2_1024); prefix2+=1024; break; +  CASE(F_PREFIX2_24BITX256); +  prefix2+=EXTRACT_UCHAR(pc++)<<24; +  CASE(F_PREFIX2_WORDX256); +  prefix2+=EXTRACT_UCHAR(pc++)<<16; +  CASE(F_PREFIX2_CHARX256); +  prefix2+=EXTRACT_UCHAR(pc++)<<8; +  break;         #define INTERPRETER      #define OPCODE0(OP,DESC) CASE(OP); {   #define OPCODE1(OP,DESC) CASE(OP); { \    INT32 arg1=GET_ARG();    - #define OPCODE1ACC(OP,DESC) CASE(OP); { \ -  INT32 arg1=GET_ARG(); \ -  INT32 acc=accumulator; -  +    #define OPCODE2(OP,DESC) CASE(OP); { \    INT32 arg1=GET_ARG(); \    INT32 arg2=GET_ARG2();      #define OPCODE0_TAIL(OP,DESC) CASE(OP);   #define OPCODE1_TAIL(OP,DESC) CASE(OP); - #define OPCODE1ACC_TAIL(OP,DESC) CASE(OP); +    #define OPCODE2_TAIL(OP,DESC) CASE(OP);         #define BREAK break; }      #include "interpret_functions.h"       default:    fatal("Strange instruction %ld\n",(long)instr);    }       }   }