212 // Fetch the locked object from the OSR temp buffer and copy to our fastlock node.
213 Node *lock_object = fetch_interpreter_state(index*2, T_OBJECT, monitors_addr, osr_buf);
214 // Try and copy the displaced header to the BoxNode
215 Node *displaced_hdr = fetch_interpreter_state((index*2) + 1, T_ADDRESS, monitors_addr, osr_buf);
216
217
218 store_to_memory(control(), box, displaced_hdr, T_ADDRESS, Compile::AliasIdxRaw);
219
220 // Build a bogus FastLockNode (no code will be generated) and push the
221 // monitor into our debug info.
222 const FastLockNode *flock = _gvn.transform(new (C, 3) FastLockNode( 0, lock_object, box ))->as_FastLock();
223 map()->push_monitor(flock);
224
225 // If the lock is our method synchronization lock, tuck it away in
226 // _sync_lock for return and rethrow exit paths.
227 if (index == 0 && method()->is_synchronized()) {
228 _synch_lock = flock;
229 }
230 }
231
232 MethodLivenessResult live_locals = method()->liveness_at_bci(osr_bci());
233 if (!live_locals.is_valid()) {
234 // Degenerate or breakpointed method.
235 C->record_method_not_compilable("OSR in empty or breakpointed method");
236 return;
237 }
238
239 // Extract the needed locals from the interpreter frame.
240 Node *locals_addr = basic_plus_adr(osr_buf, osr_buf, (max_locals-1)*wordSize);
241
242 // find all the locals that the interpreter thinks contain live oops
243 const BitMap live_oops = method()->live_local_oops_at_bci(osr_bci());
244 for (index = 0; index < max_locals; index++) {
245
246 if (!live_locals.at(index)) {
247 continue;
248 }
249
250 const Type *type = osr_block->local_type_at(index);
251
252 if (type->isa_oopptr() != NULL) {
|
212 // Fetch the locked object from the OSR temp buffer and copy to our fastlock node.
213 Node *lock_object = fetch_interpreter_state(index*2, T_OBJECT, monitors_addr, osr_buf);
214 // Try and copy the displaced header to the BoxNode
215 Node *displaced_hdr = fetch_interpreter_state((index*2) + 1, T_ADDRESS, monitors_addr, osr_buf);
216
217
218 store_to_memory(control(), box, displaced_hdr, T_ADDRESS, Compile::AliasIdxRaw);
219
220 // Build a bogus FastLockNode (no code will be generated) and push the
221 // monitor into our debug info.
222 const FastLockNode *flock = _gvn.transform(new (C, 3) FastLockNode( 0, lock_object, box ))->as_FastLock();
223 map()->push_monitor(flock);
224
225 // If the lock is our method synchronization lock, tuck it away in
226 // _sync_lock for return and rethrow exit paths.
227 if (index == 0 && method()->is_synchronized()) {
228 _synch_lock = flock;
229 }
230 }
231
232 // Use the raw liveness computation to make sure that unexpected
233 // values don't propagate into the OSR frame.
234 MethodLivenessResult live_locals = method()->raw_liveness_at_bci(osr_bci());
235 if (!live_locals.is_valid()) {
236 // Degenerate or breakpointed method.
237 C->record_method_not_compilable("OSR in empty or breakpointed method");
238 return;
239 }
240
241 // Extract the needed locals from the interpreter frame.
242 Node *locals_addr = basic_plus_adr(osr_buf, osr_buf, (max_locals-1)*wordSize);
243
244 // find all the locals that the interpreter thinks contain live oops
245 const BitMap live_oops = method()->live_local_oops_at_bci(osr_bci());
246 for (index = 0; index < max_locals; index++) {
247
248 if (!live_locals.at(index)) {
249 continue;
250 }
251
252 const Type *type = osr_block->local_type_at(index);
253
254 if (type->isa_oopptr() != NULL) {
|