comparison src/share/vm/c1x/c1x_CodeInstaller.cpp @ 1941:79d04223b8a5

Added caching for resolved types and resolved fields. This is crucial, because the local load elimination will lead to wrong results, if field equality (of two RiField objects with the same object and the same RiType) is not given. The caching makes sure that the default equals implementation is sufficient.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Tue, 28 Dec 2010 18:33:26 +0100
parents 1aa5b22a7716
children 00bc9eaf0e24
comparison
equal deleted inserted replaced
1940:e92a9a73324e 1941:79d04223b8a5
557 case 'a': { 557 case 'a': {
558 address operand = Assembler::locate_operand(instruction, Assembler::imm_operand); 558 address operand = Assembler::locate_operand(instruction, Assembler::imm_operand);
559 Handle obj = CiConstant::object(constant); 559 Handle obj = CiConstant::object(constant);
560 560
561 if (obj->is_a(HotSpotTypeResolved::klass())) { 561 if (obj->is_a(HotSpotTypeResolved::klass())) {
562 *((jobject*) operand) = JNIHandles::make_local(VmIds::get<klassOop>(HotSpotTypeResolved::vmId(obj))); 562 *((jobject*) operand) = JNIHandles::make_local(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(obj)));
563 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); 563 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand);
564 TRACE_C1X_3("relocating (HotSpotType) at %016x/%016x", instruction, operand); 564 TRACE_C1X_3("relocating (HotSpotType) at %016x/%016x", instruction, operand);
565 } else { 565 } else {
566 jobject value; 566 jobject value;
567 if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) { 567 if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) {