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