Beispiel #1
0
bool VM::check_interrupts(CallFrame* call_frame, void* end) {
    // First, we might be here because someone reset the stack_limit_ so that
    // we'd fall into here to check interrupts even if the stack is fine,
    //
    // So fix up the stack_limit_ if thats the case first.

    // If this is true, stack_limit_ was just changed to get our attention, reset
    // it now.
    if(stack_limit_ == stack_start_) {
        reset_stack_limit();
    } else {
        if(!check_stack(call_frame, end)) return false;
    }

    if(unlikely(check_local_interrupts)) {
        if(!process_async(call_frame)) return false;
    }

    // If the current thread is trying to step, debugger wise, then assist!
    if(thread_step()) {
        clear_thread_step();
        if(!Helpers::yield_debugger(this, call_frame, Qnil)) return false;
    }

    return true;
}
Beispiel #2
0
    void set_stack_bounds(uintptr_t start, int length) {
      if(start == 0) {
        start  = root_stack_start_;
        length = root_stack_size_;
      }

      vm_jit_.stack_start_ = start;
      vm_jit_.stack_size_ = length;
      reset_stack_limit();
    }
Beispiel #3
0
 void set_stack_bounds(uintptr_t start, int length) {
   stack_start_ = start;
   stack_size_ = length;
   reset_stack_limit();
 }