pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:1131: Inside #if defined(PIKE_USE_MACHINE_CODE) and #if defined(OPCODE_INLINE_RETURN)
   * rest of code.    */      /* Modified calling-conventions to simplify code-generation when    * INTER_RETURN is inlined.    *    * cf interpret_functions.h:F_CATCH    *    * Arguments:    * addr: -  * Entry-point for the catch block. +  * Address where the continue POINTER (INT32) is stored. +  * Directly after the POINTER is the ENTRY for the catch block.    * -  * continue_addr: -  * Offset from addr for code after the catch (and after ENTRY). -  * +     * Returns:    * (PIKE_OPCODE_T *)-1 on INTER_RETURN.    * jump_destination otherwise.    */ - PIKE_OPCODE_T *inter_return_opcode_F_CATCH(PIKE_OPCODE_T *addr, -  INT32 continue_addr) + PIKE_OPCODE_T *inter_return_opcode_F_CATCH(PIKE_OPCODE_T *addr)   {   #ifdef PIKE_DEBUG    if (d_flag || Pike_interpreter.trace_level > 2) {    low_debug_instr_prologue (F_CATCH - F_OFFSET);    if (Pike_interpreter.trace_level>3) { -  sprintf(trace_buffer, -  "- Addr = %p\n" -  "- Continue = 0x%ld\n", -  addr, continue_addr); +  sprintf(trace_buffer, "- Addr = %p\n", addr);    write_to_stderr(trace_buffer,strlen(trace_buffer));    }    }   #endif    {    struct catch_context *new_catch_ctx = alloc_catch_context();   #ifdef PIKE_DEBUG    new_catch_ctx->frame = Pike_fp;    init_recovery (&new_catch_ctx->recovery, 0, 0, PERR_LOCATION());   #else    init_recovery (&new_catch_ctx->recovery, 0);   #endif    new_catch_ctx->save_expendible = Pike_fp->expendible; -  new_catch_ctx->continue_reladdr = continue_addr +  new_catch_ctx->continue_reladdr = ((INT32 *)addr)[0]    /* We need to run the entry prologue... */    - ENTRY_PROLOGUE_SIZE;       new_catch_ctx->next_addr = addr;    new_catch_ctx->prev = Pike_interpreter.catch_ctx;    Pike_interpreter.catch_ctx = new_catch_ctx;    DO_IF_DEBUG({ -  TRACE((3,"- Pushed catch context %p\n", new_catch_ctx)); +  TRACE((CATCH_TRACE_LEVEL,"- Pushed catch context %p\n", new_catch_ctx));    });    }       Pike_fp->expendible = Pike_fp->locals + Pike_fp->num_locals;    - #if 0 +     /* Need to adjust next_addr by sizeof(INT32) to skip past the jump    * address to the continue position after the catch block. */    addr = (PIKE_OPCODE_T *) ((INT32 *) addr + 1); - #endif +        if (Pike_interpreter.catching_eval_jmpbuf) {    /* There's already a catching_eval_instruction around our    * eval_instruction, so we can just continue. */    debug_malloc_touch_named (Pike_interpreter.catch_ctx, "(1)");    /* Skip past the entry prologue... */    addr += ENTRY_PROLOGUE_SIZE;    DO_IF_DEBUG({    TRACE((3,"- In active catch; continuing at %p\n", addr));    });