pike.git / src / interpret_functions.h

version» Context lines:

pike.git/src/interpret_functions.h:1:   /* -  * $Id: interpret_functions.h,v 1.104 2002/05/15 09:11:21 grubba Exp $ +  * $Id: interpret_functions.h,v 1.105 2002/08/15 14:49:21 marcus Exp $    *    * Opcode definitions for the interpreter.    */      #include "global.h"      #undef CJUMP   #undef AUTO_BIGNUM_LOOP_TEST   #undef LOOP   #undef COMPARISON
pike.git/src/interpret_functions.h:282:   });      OPCODE2(F_TRAMPOLINE, "trampoline", 0, {    struct object *o=low_clone(pike_trampoline_program);    struct pike_frame *f=Pike_fp;    DO_IF_DEBUG(INT32 arg2_ = arg2);       while(arg2--) {    DO_IF_DEBUG({    if (!f->scope) { -  fatal("F_TRAMPOLINE %d, %d: Missing %d levels of scope!\n", +  Pike_fatal("F_TRAMPOLINE %d, %d: Missing %d levels of scope!\n",    arg1, arg2_, arg2+1);    }    });    f=f->scope;    }    add_ref( ((struct pike_trampoline *)(o->storage))->frame=f );    ((struct pike_trampoline *)(o->storage))->func=arg1+Pike_fp->context.identifier_level;    push_object(o);    /* Make it look like a function. */    Pike_sp[-1].subtype = pike_trampoline_program->lfuns[LFUN_CALL];
pike.git/src/interpret_functions.h:959:    pop_n_elems(Pike_sp - *--Pike_mark_sp);   });      /* 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) { -  fatal("Mark stack out of synch - 0x%08x <= 0x%08x.\n", +  Pike_fatal("Mark stack out of synch - 0x%08x <= 0x%08x.\n",    DO_NOT_WARN((unsigned long)Pike_mark_sp),    DO_NOT_WARN((unsigned long)Pike_interpreter.mark_stack));    } 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); -  fatal("Stack out of synch - should be %ld, is %ld.\n", +  Pike_fatal("Stack out of synch - should be %ld, is %ld.\n",    DO_NOT_WARN((long)should), DO_NOT_WARN((long)is));    }    }    });   });      OPCODE0(F_CLEAR_STRING_SUBTYPE, "clear string subtype", 0, {    if(Pike_sp[-1].type==PIKE_T_STRING) Pike_sp[-1].subtype=0;   });   
pike.git/src/interpret_functions.h:1645:   });      OPCODE0(F_CAST_TO_STRING, "cast_to_string", 0, {    o_cast_to_string();   });      OPCODE0(F_SOFT_CAST, "soft cast", 0, {    /* Stack: type_string, value */    DO_IF_DEBUG({    if (Pike_sp[-2].type != T_TYPE) { -  fatal("Argument 1 to soft_cast isn't a type!\n"); +  Pike_fatal("Argument 1 to soft_cast isn't a type!\n");    }    });    if (runtime_options & RUNTIME_CHECK_TYPES) {    struct pike_type *sval_type = get_type_of_svalue(Pike_sp-1);    if (!pike_types_le(sval_type, Pike_sp[-2].u.type)) {    /* get_type_from_svalue() doesn't return a fully specified type    * for array, mapping and multiset, so we perform a more lenient    * check for them.    */    if (!pike_types_le(sval_type, weak_type_string) ||
pike.git/src/interpret_functions.h:2015:    { \    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) \ -  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) \ -  fatal("Function left %d droppings on stack: %s\n", \ +  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) \ -  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) \ -  fatal("Void function returned with a value on the stack: %s %d\n", \ +  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(); \   }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, {
pike.git/src/interpret_functions.h:2181:       fast_check_threads_etc(6);       addr=PROG_COUNTER+GET_JUMP();    args=addr[-1];    num_locals=addr[-2];          DO_IF_DEBUG({    if(args != EXTRACT_UCHAR(addr-1)) -  fatal("Wrong number of arguments in F_TAIL_RECUR %d != %d\n", +  Pike_fatal("Wrong number of arguments in F_TAIL_RECUR %d != %d\n",    args, EXTRACT_UCHAR(addr-1));    });       if(Pike_sp-args != Pike_fp->locals)    {    DO_IF_DEBUG({    if (Pike_sp < Pike_fp->locals + args) -  fatal("Pike_sp (%p) < Pike_fp->locals (%p) + args (%d)\n", +  Pike_fatal("Pike_sp (%p) < Pike_fp->locals (%p) + args (%d)\n",    Pike_sp, Pike_fp->locals, args);    });    assign_svalues(Pike_fp->locals, Pike_sp-args, args, BIT_MIXED);    pop_n_elems(Pike_sp - (Pike_fp->locals + args));    }       push_zeroes(num_locals - args);       DO_IF_DEBUG({    if(Pike_sp != Pike_fp->locals + Pike_fp->num_locals) -  fatal("Sp whacked!\n"); +  Pike_fatal("Sp whacked!\n");    });       DO_JUMP_TO(addr);   });      OPCODE0(F_BREAKPOINT, "breakpoint", 0, {    extern void o_breakpoint(void);    o_breakpoint();    DO_JUMP_TO(PROG_COUNTER-1);   });
pike.git/src/interpret_functions.h:2223:    if(Pike_fp)    {    struct object *o = Pike_fp->current_object;    int level = arg1;    for (; level > 0; level--) {    struct program *p = o->prog;    if (!p)    Pike_error ("Cannot get the parent object of a destructed object.\n");    DO_IF_DEBUG (    if (!(p->flags & PROGRAM_USES_PARENT)) -  fatal ("optimize_this_object failed to set up parent pointers.\n"); +  Pike_fatal ("optimize_this_object failed to set up parent pointers.\n");    );    o = PARENT_INFO(o)->parent;    }    ref_push_object(o);    }else{    /* Shouldn't this generate an error? /mast */    push_int(0);    }   });