pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:2638:    /* Hook our frame again. */    current->next=Pike_interpreter.frame_pointer;    Pike_interpreter.frame_pointer=current;      #ifdef PROFILING    current->children_base = Pike_interpreter.accounted_time;    current->start_time = get_cpu_time() - Pike_interpreter.unlocked_time;   #endif /* PROFILING */   }    - static void restore_catching_eval_jmpbuf (jmp_buf *p) + static void restore_catching_eval_jmpbuf (LOW_JMP_BUF *p)   {    Pike_interpreter.catching_eval_jmpbuf = p;   }      PMOD_EXPORT void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2)   {    /* Save and clear Pike_interpreter.catching_eval_jmpbuf so that the -  * following eval_instruction will install a jmp_buf of its own to -  * handle catches. */ -  jmp_buf *saved_jmpbuf = Pike_interpreter.catching_eval_jmpbuf; +  * following eval_instruction will install a LOW_JMP_BUF of its +  * own to handle catches. */ +  LOW_JMP_BUF *saved_jmpbuf = Pike_interpreter.catching_eval_jmpbuf;    ONERROR uwp;    Pike_interpreter.catching_eval_jmpbuf = NULL;    SET_ONERROR (uwp, restore_catching_eval_jmpbuf, saved_jmpbuf);       /* The C stack margin is normally 8 kb, but if we get here during a    * lowered margin then don't fail just because of that, unless it's    * practically zero. */    check_c_stack(Pike_interpreter.c_stack_margin ?    Pike_interpreter.c_stack_margin : 100);    if( low_mega_apply(type, args, arg1, arg2) )
pike.git/src/interpret.c:2673:   #endif /* ENTRY_PROLOGUE_SIZE */    );    low_return();    }    CALL_AND_UNSET_ONERROR(uwp);   }      PMOD_EXPORT void mega_apply_low(INT32 args, void *arg1, ptrdiff_t arg2)   {    /* Save and clear Pike_interpreter.catching_eval_jmpbuf so that the -  * following eval_instruction will install a jmp_buf of its own to -  * handle catches. */ -  jmp_buf *saved_jmpbuf = Pike_interpreter.catching_eval_jmpbuf; +  * following eval_instruction will install a LOW_JMP_BUF of its +  * own to handle catches. */ +  LOW_JMP_BUF *saved_jmpbuf = Pike_interpreter.catching_eval_jmpbuf;    ONERROR uwp;    Pike_interpreter.catching_eval_jmpbuf = NULL;    SET_ONERROR (uwp, restore_catching_eval_jmpbuf, saved_jmpbuf);       /* The C stack margin is normally 8 kb, but if we get here during a    * lowered margin then don't fail just because of that, unless it's    * practically zero. */    check_c_stack(Pike_interpreter.c_stack_margin ?    Pike_interpreter.c_stack_margin : 100);    if( lower_mega_apply( args, arg1, arg2 ) )
pike.git/src/interpret.c:2702:    low_return();    }    CALL_AND_UNSET_ONERROR(uwp);   }      /* Put catch outside of eval_instruction, so the setjmp won't affect    * the optimization of eval_instruction.    */   static int catching_eval_instruction (PIKE_OPCODE_T *pc)   { -  jmp_buf jmpbuf; +  LOW_JMP_BUF jmpbuf;   #ifdef PIKE_DEBUG    if (Pike_interpreter.catching_eval_jmpbuf)    Pike_fatal ("catching_eval_jmpbuf already active.\n");   #endif    Pike_interpreter.catching_eval_jmpbuf = &jmpbuf; -  if (setjmp (jmpbuf)) +  if (LOW_SETJMP (jmpbuf))    {    Pike_interpreter.catching_eval_jmpbuf = NULL;   #ifdef PIKE_DEBUG    pike_trace(3, "- catching_eval_instruction(%p) caught error ==> -3\n",    pc);   #endif    return -3;    }else{    int x;    check_c_stack(8192);
pike.git/src/interpret.c:2823:      /* NOTE: This function may only be called from the compiler! */   int apply_low_safe_and_stupid(struct object *o, INT32 offset)   {    JMP_BUF tmp;    struct pike_frame *new_frame=alloc_pike_frame();    int ret;    volatile int use_dummy_reference = 1;    struct program *prog = o->prog;    int p_flags = prog->flags; -  jmp_buf *saved_jmpbuf; +  LOW_JMP_BUF *saved_jmpbuf;    int fun = -1;       /* Search for a function that belongs to the current program,    * since this is needed for opcodes that use INHERIT_FROM_*    * (eg F_EXTERN) to work.    */    for (fun = prog->num_identifier_references; fun--;) {    if (!prog->identifier_references[fun].inherit_offset) {    use_dummy_reference = 0;    break;