< prev index next >

src/hotspot/share/runtime/sharedRuntime.cpp

Print this page




3470     assert(verif_vk == NULL, "broken calling convention");
3471     return;
3472   }
3473 
3474   clear_nth_bit(res, 0);
3475   ValueKlass* vk = (ValueKlass*)res;
3476   assert(verif_vk == vk, "broken calling convention");
3477   assert(Metaspace::contains((void*)res), "should be klass");
3478 
3479   // Allocate handles for every oop fields so they are safe in case of
3480   // a safepoint when allocating
3481   GrowableArray<Handle> handles;
3482   vk->save_oop_fields(reg_map, handles);
3483 
3484   // It's unsafe to safepoint until we are here
3485 
3486   Handle new_vt;
3487   JRT_BLOCK;
3488   {
3489     Thread* THREAD = thread;
3490     oop vt = vk->realloc_result(reg_map, handles, callerFrame.is_interpreted_frame(), CHECK);
3491     new_vt = Handle(thread, vt);
3492 
3493 #ifdef ASSERT
3494     javaVFrame* vf = javaVFrame::cast(vframe::new_vframe(&callerFrame, &reg_map, thread));
3495     Method* m = vf->method();
3496     int bci = vf->bci();
3497     Bytecode_invoke inv(m, bci);
3498 
3499     methodHandle callee = inv.static_target(thread);
3500     assert(!thread->has_pending_exception(), "call resolution should work");
3501     ValueKlass* verif_vk2 = callee->returned_value_type(thread);
3502     assert(verif_vk == verif_vk2, "Bad value klass");
3503 #endif
3504   }
3505   JRT_BLOCK_END;
3506 
3507   thread->set_vm_result(new_vt());
3508 }
3509 JRT_END
3510 


3470     assert(verif_vk == NULL, "broken calling convention");
3471     return;
3472   }
3473 
3474   clear_nth_bit(res, 0);
3475   ValueKlass* vk = (ValueKlass*)res;
3476   assert(verif_vk == vk, "broken calling convention");
3477   assert(Metaspace::contains((void*)res), "should be klass");
3478 
3479   // Allocate handles for every oop fields so they are safe in case of
3480   // a safepoint when allocating
3481   GrowableArray<Handle> handles;
3482   vk->save_oop_fields(reg_map, handles);
3483 
3484   // It's unsafe to safepoint until we are here
3485 
3486   Handle new_vt;
3487   JRT_BLOCK;
3488   {
3489     Thread* THREAD = thread;
3490     oop vt = vk->realloc_result(reg_map, handles, CHECK);
3491     new_vt = Handle(thread, vt);
3492 
3493 #ifdef ASSERT
3494     javaVFrame* vf = javaVFrame::cast(vframe::new_vframe(&callerFrame, &reg_map, thread));
3495     Method* m = vf->method();
3496     int bci = vf->bci();
3497     Bytecode_invoke inv(m, bci);
3498 
3499     methodHandle callee = inv.static_target(thread);
3500     assert(!thread->has_pending_exception(), "call resolution should work");
3501     ValueKlass* verif_vk2 = callee->returned_value_type(thread);
3502     assert(verif_vk == verif_vk2, "Bad value klass");
3503 #endif
3504   }
3505   JRT_BLOCK_END;
3506 
3507   thread->set_vm_result(new_vt());
3508 }
3509 JRT_END
3510 
< prev index next >