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.120 2002/11/14 20:19:06 marcus Exp $ + || $Id: interpret_functions.h,v 1.121 2003/01/05 21:49:38 grubba Exp $   */      /*    * Opcode definitions for the interpreter.    */      #include "global.h"      #undef CJUMP   #undef AUTO_BIGNUM_LOOP_TEST
pike.git/src/interpret_functions.h:992:   });      /* These opcodes are only used when running with -d. The reason for    * the two aliases is mainly to keep the indentation in asm debug    * output. */   OPCODE0_TAIL(F_CLEANUP_SYNCH_MARK, "cleanup synch mark", 0, {    OPCODE0(F_POP_SYNCH_MARK, "pop synch mark", 0, {    if (d_flag) {    if (Pike_mark_sp <= Pike_interpreter.mark_stack) {    Pike_fatal("Mark stack out of synch - 0x%08lx <= 0x%08lx.\n", -  DO_NOT_WARN((unsigned long)Pike_mark_sp), -  DO_NOT_WARN((unsigned long)Pike_interpreter.mark_stack)); +  DO_NOT_WARN((unsigned long) +  (((char *)Pike_mark_sp)- +  (char *)0)), +  DO_NOT_WARN((unsigned long) +  (((char *)Pike_interpreter.mark_stack)- +  (char *)0)));    } else if (*--Pike_mark_sp != Pike_sp) {    ptrdiff_t should = *Pike_mark_sp - Pike_interpreter.evaluator_stack;    ptrdiff_t is = Pike_sp - Pike_interpreter.evaluator_stack;    if (Pike_sp - *Pike_mark_sp > 0) /* not always same as Pike_sp > *Pike_mark_sp */    /* Some attempt to recover, just to be able to report the backtrace. */    pop_n_elems(Pike_sp - *Pike_mark_sp);    Pike_fatal("Stack out of synch - should be %ld, is %ld.\n",    DO_NOT_WARN((long)should), DO_NOT_WARN((long)is));    }    }
pike.git/src/interpret_functions.h:1749:      OPCODE1(F_SIZEOF_LOCAL, "sizeof local", 0, {    push_int(pike_sizeof(Pike_fp->locals+arg1));   });      OPCODE1_ALIAS(F_SSCANF, "sscanf", 0, o_sscanf);      #define MKAPPLY(OP,OPCODE,NAME,TYPE, ARG2, ARG3) \   OP(PIKE_CONCAT(F_,OPCODE),NAME, I_PC_AT_NEXT, { \   Pike_fp->pc=PROG_COUNTER; \ - if(low_mega_apply(TYPE,DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), \ + if(low_mega_apply(TYPE,0,DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), \    ARG2, ARG3)) \   { \    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL; \    DO_JUMP_TO(Pike_fp->pc); \   } \   }); \    \   OP(PIKE_CONCAT3(F_,OPCODE,_AND_POP),NAME " & pop", I_PC_AT_NEXT, { \    Pike_fp->pc=PROG_COUNTER; \ -  if(low_mega_apply(TYPE, DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), \ +  if(low_mega_apply(TYPE, 0, DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), \    ARG2, ARG3)) \    { \    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL | PIKE_FRAME_RETURN_POP; \    DO_JUMP_TO(Pike_fp->pc); \    }else{ \    pop_stack(); \    } \   }); \    \   PIKE_CONCAT(OP,_RETURN)(PIKE_CONCAT3(F_,OPCODE,_AND_RETURN), \    NAME " & return", 0, { \ -  if(low_mega_apply(TYPE,DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), \ +  if(low_mega_apply(TYPE,0, DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp)), \    ARG2,ARG3)) \    { \    PIKE_OPCODE_T *addr = Pike_fp->pc; \    DO_IF_DEBUG(Pike_fp->next->pc=0); \    unlink_previous_frame(); \    DO_JUMP_TO(addr); \    }else{ \    DO_DUMB_RETURN; \    } \   }); \         #define MKAPPLY2(OP,OPCODE,NAME,TYPE, ARG2, ARG3) \    \   MKAPPLY(OP,OPCODE,NAME,TYPE, ARG2, ARG3) \    \   OP(PIKE_CONCAT(F_MARK_,OPCODE),"mark, " NAME, I_PC_AT_NEXT, { \    Pike_fp->pc=PROG_COUNTER; \ -  if(low_mega_apply(TYPE,0, \ +  if(low_mega_apply(TYPE,0, 0, \    ARG2, ARG3)) \    { \    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL; \    DO_JUMP_TO(Pike_fp->pc); \    } \   }); \    \   OP(PIKE_CONCAT3(F_MARK_,OPCODE,_AND_POP),"mark, " NAME " & pop", I_PC_AT_NEXT, { \    Pike_fp->pc=PROG_COUNTER; \ -  if(low_mega_apply(TYPE, 0, \ +  if(low_mega_apply(TYPE, 0, 0, \    ARG2, ARG3)) \    { \    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL | PIKE_FRAME_RETURN_POP; \    DO_JUMP_TO(Pike_fp->pc); \    }else{ \    pop_stack(); \    } \   }); \    \   PIKE_CONCAT(OP,_RETURN)(PIKE_CONCAT3(F_MARK_,OPCODE,_AND_RETURN), \    "mark, " NAME " & return", 0, { \ -  if(low_mega_apply(TYPE,0, \ +  if(low_mega_apply(TYPE,0, 0, \    ARG2,ARG3)) \    { \    PIKE_OPCODE_T *addr = Pike_fp->pc; \    DO_IF_DEBUG(Pike_fp->next->pc=0); \    unlink_previous_frame(); \    DO_JUMP_TO(addr); \    }else{ \    DO_DUMB_RETURN; \    } \   })
pike.git/src/interpret_functions.h:1851:    struct program *p;    if((p=o->prog))    {    if(FIND_LFUN(p, LFUN_ARROW) == -1)    {    int fun;    fun=find_shared_string_identifier(Pike_fp->context.prog->strings[arg1],    p);    if(fun >= 0)    { -  if(low_mega_apply(APPLY_LOW, args-1, o, (void *)(ptrdiff_t)fun)) +  if(low_mega_apply(APPLY_LOW, 0, args-1, o, (void *)(ptrdiff_t)fun))    {    Pike_fp->save_sp--;    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL;    DO_JUMP_TO(Pike_fp->pc);    }    stack_unlink(1);    DONE;    }    }    }
pike.git/src/interpret_functions.h:1877:       tmp.type=PIKE_T_STRING;    tmp.u.string=Pike_fp->context.prog->strings[arg1];    tmp.subtype=1;       index_no_free(&tmp2, s, &tmp);    free_svalue(s);    *s=tmp2;    print_return_value();    -  if(low_mega_apply(APPLY_STACK, args, 0, 0)) +  if(low_mega_apply(APPLY_STACK, 0, args, 0, 0))    {    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL;    DO_JUMP_TO(Pike_fp->pc);    }    DONE;    }   });      OPCODE1(F_CALL_OTHER_AND_POP,"call other & pop", I_PC_AT_NEXT, {    INT32 args=DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp));
pike.git/src/interpret_functions.h:1903:    struct program *p;    if((p=o->prog))    {    if(FIND_LFUN(p, LFUN_ARROW) == -1)    {    int fun;    fun=find_shared_string_identifier(Pike_fp->context.prog->strings[arg1],    p);    if(fun >= 0)    { -  if(low_mega_apply(APPLY_LOW, args-1, o, (void *)(ptrdiff_t)fun)) +  if(low_mega_apply(APPLY_LOW, 0, args-1, o, (void *)(ptrdiff_t)fun))    {    Pike_fp->save_sp--;    Pike_fp->flags |=    PIKE_FRAME_RETURN_INTERNAL |    PIKE_FRAME_RETURN_POP;    DO_JUMP_TO(Pike_fp->pc);    }    pop_2_elems();    DONE;    }
pike.git/src/interpret_functions.h:1931:       tmp.type=PIKE_T_STRING;    tmp.u.string=Pike_fp->context.prog->strings[arg1];    tmp.subtype=1;       index_no_free(&tmp2, s, &tmp);    free_svalue(s);    *s=tmp2;    print_return_value();    -  if(low_mega_apply(APPLY_STACK, args, 0, 0)) +  if(low_mega_apply(APPLY_STACK, 0, args, 0, 0))    {    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL | PIKE_FRAME_RETURN_POP;    DO_JUMP_TO(Pike_fp->pc);    }    pop_stack();    }   });      OPCODE1(F_CALL_OTHER_AND_RETURN,"call other & return", 0, {    INT32 args=DO_NOT_WARN((INT32)(Pike_sp - *--Pike_mark_sp));
pike.git/src/interpret_functions.h:1956:    struct program *p;    if((p=o->prog))    {    if(FIND_LFUN(p, LFUN_ARROW) == -1)    {    int fun;    fun=find_shared_string_identifier(Pike_fp->context.prog->strings[arg1],    p);    if(fun >= 0)    { -  if(low_mega_apply(APPLY_LOW, args-1, o, (void *)(ptrdiff_t)fun)) +  if(low_mega_apply(APPLY_LOW, 0, args-1, o, (void *)(ptrdiff_t)fun))    {    PIKE_OPCODE_T *addr = Pike_fp->pc;    Pike_fp->save_sp--;    DO_IF_DEBUG(Pike_fp->next->pc=0);    unlink_previous_frame();    DO_JUMP_TO(addr);    }    stack_unlink(1);    DO_DUMB_RETURN;    }
pike.git/src/interpret_functions.h:1984:       tmp.type=PIKE_T_STRING;    tmp.u.string=Pike_fp->context.prog->strings[arg1];    tmp.subtype=1;       index_no_free(&tmp2, s, &tmp);    free_svalue(s);    *s=tmp2;    print_return_value();    -  if(low_mega_apply(APPLY_STACK, args, 0, 0)) +  if(low_mega_apply(APPLY_STACK, 0, args, 0, 0))    {    PIKE_OPCODE_T *addr = Pike_fp->pc;    DO_IF_DEBUG(Pike_fp->next->pc=0);    unlink_previous_frame();    DO_JUMP_TO(addr);    }    DO_DUMB_RETURN;    }   });   
pike.git/src/interpret_functions.h:2148:    */    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, +  if(low_mega_apply(APPLY_LOW, 0,    args,    Pike_fp->current_object,    (void *)(ptrdiff_t)(arg1+    Pike_fp->context.identifier_level)))    {    Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL;    addr = Pike_fp->pc;    }    DO_JUMP_TO(addr);    }