comparison src/share/vm/graal/graalCodeInstaller.cpp @ 7814:bab2a51f8dbe

Introduce marker interface InvokeTarget. Remove method lookupRuntimeCall from CodeCacheProvider.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 18 Feb 2013 20:21:09 -0800
parents c58f8f4cda69
children 4e1278443941
comparison
equal deleted inserted replaced
7813:c58f8f4cda69 7814:bab2a51f8dbe
603 InstanceKlass* target_klass = InstanceKlass::cast(target->klass()); 603 InstanceKlass* target_klass = InstanceKlass::cast(target->klass());
604 604
605 oop hotspot_method = NULL; // JavaMethod 605 oop hotspot_method = NULL; // JavaMethod
606 oop global_stub = NULL; 606 oop global_stub = NULL;
607 607
608 if (target_klass->is_subclass_of(SystemDictionary::Long_klass())) { 608 if (target_klass->is_subclass_of(SystemDictionary::HotSpotRuntimeCallTarget_klass())) {
609 global_stub = target; 609 global_stub = target;
610 } else { 610 } else {
611 hotspot_method = target; 611 hotspot_method = target;
612 } 612 }
613 613
656 // Stubs do not record scope info, just oop maps 656 // Stubs do not record scope info, just oop maps
657 } 657 }
658 } 658 }
659 659
660 if (global_stub != NULL) { 660 if (global_stub != NULL) {
661 assert(java_lang_boxing_object::is_instance(global_stub, T_LONG), "global_stub needs to be of type Long"); 661 jlong global_stub_destination = HotSpotRuntimeCallTarget::address(global_stub);
662
663 jlong global_stub_destination = global_stub->long_field(java_lang_boxing_object::value_offset_in_bytes(T_LONG));
664 if (inst->is_call()) { 662 if (inst->is_call()) {
665 // NOTE: for call without a mov, the offset must fit a 32-bit immediate 663 // NOTE: for call without a mov, the offset must fit a 32-bit immediate
666 // see also CompilerToVM.getMaxCallTargetOffset() 664 // see also CompilerToVM.getMaxCallTargetOffset()
667 NativeCall* call = nativeCall_at((address) (inst)); 665 NativeCall* call = nativeCall_at((address) (inst));
668 call->set_destination((address) global_stub_destination); 666 call->set_destination((address) global_stub_destination);