src/cpu/zero/vm/frame_zero.cpp

changeset 4442
c566b81b3323
parent 4237
a3e2f723f2a5
child 5545
e16282db4946
     1.1 --- a/src/cpu/zero/vm/frame_zero.cpp	Fri Jan 11 16:47:23 2013 -0800
     1.2 +++ b/src/cpu/zero/vm/frame_zero.cpp	Fri Jan 11 16:47:23 2013 -0800
     1.3 @@ -98,10 +98,20 @@
     1.4  #endif // CC_INTERP
     1.5  
     1.6  void frame::patch_pc(Thread* thread, address pc) {
     1.7 -  // We borrow this call to set the thread pointer in the interpreter
     1.8 -  // state; the hook to set up deoptimized frames isn't supplied it.
     1.9 -  assert(pc == NULL, "should be");
    1.10 -  get_interpreterState()->set_thread((JavaThread *) thread);
    1.11 +
    1.12 +  if (pc != NULL) {
    1.13 +    _cb = CodeCache::find_blob(pc);
    1.14 +    SharkFrame* sharkframe = zeroframe()->as_shark_frame();
    1.15 +    sharkframe->set_pc(pc);
    1.16 +    _pc = pc;
    1.17 +    _deopt_state = is_deoptimized;
    1.18 +
    1.19 +  } else {
    1.20 +    // We borrow this call to set the thread pointer in the interpreter
    1.21 +    // state; the hook to set up deoptimized frames isn't supplied it.
    1.22 +    assert(pc == NULL, "should be");
    1.23 +    get_interpreterState()->set_thread((JavaThread *) thread);
    1.24 +  }
    1.25  }
    1.26  
    1.27  bool frame::safe_for_sender(JavaThread *thread) {

mercurial