Mercurial > hg > graal-jvmci-8
comparison src/cpu/zero/vm/frame_zero.cpp @ 7599:c566b81b3323
8005817: Shark: implement deoptimization support
Reviewed-by: twisti
Contributed-by: Roman Kennke <rkennke@redhat.com>
author | twisti |
---|---|
date | Fri, 11 Jan 2013 16:47:23 -0800 |
parents | a3e2f723f2a5 |
children | e16282db4946 |
comparison
equal
deleted
inserted
replaced
7598:f9bda35f4226 | 7599:c566b81b3323 |
---|---|
96 return (BasicObjectLock*) get_interpreterState()->stack_base(); | 96 return (BasicObjectLock*) get_interpreterState()->stack_base(); |
97 } | 97 } |
98 #endif // CC_INTERP | 98 #endif // CC_INTERP |
99 | 99 |
100 void frame::patch_pc(Thread* thread, address pc) { | 100 void frame::patch_pc(Thread* thread, address pc) { |
101 // We borrow this call to set the thread pointer in the interpreter | 101 |
102 // state; the hook to set up deoptimized frames isn't supplied it. | 102 if (pc != NULL) { |
103 assert(pc == NULL, "should be"); | 103 _cb = CodeCache::find_blob(pc); |
104 get_interpreterState()->set_thread((JavaThread *) thread); | 104 SharkFrame* sharkframe = zeroframe()->as_shark_frame(); |
105 sharkframe->set_pc(pc); | |
106 _pc = pc; | |
107 _deopt_state = is_deoptimized; | |
108 | |
109 } else { | |
110 // We borrow this call to set the thread pointer in the interpreter | |
111 // state; the hook to set up deoptimized frames isn't supplied it. | |
112 assert(pc == NULL, "should be"); | |
113 get_interpreterState()->set_thread((JavaThread *) thread); | |
114 } | |
105 } | 115 } |
106 | 116 |
107 bool frame::safe_for_sender(JavaThread *thread) { | 117 bool frame::safe_for_sender(JavaThread *thread) { |
108 ShouldNotCallThis(); | 118 ShouldNotCallThis(); |
109 } | 119 } |