Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 5682:f787843c890c
implemented inferStamp for NewInstanceStubCall to infer exact, non-null stamp from constant hub value
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 22 Jun 2012 10:43:06 +0200 |
parents | 69358a2182a3 |
children | 2a64cf19ab2a |
comparison
equal
deleted
inserted
replaced
5679:b32dc49bc024 | 5682:f787843c890c |
---|---|
778 address operand = Assembler::locate_operand(instruction, Assembler::imm_operand); | 778 address operand = Assembler::locate_operand(instruction, Assembler::imm_operand); |
779 Handle obj = Constant::object(constant); | 779 Handle obj = Constant::object(constant); |
780 | 780 |
781 if (obj->is_a(HotSpotKlassOop::klass())) { | 781 if (obj->is_a(HotSpotKlassOop::klass())) { |
782 assert(!obj.is_null(), ""); | 782 assert(!obj.is_null(), ""); |
783 *((jobject*) operand) = JNIHandles::make_local(java_lang_Class::as_klassOop(HotSpotKlassOop::javaMirror(obj))); | 783 oop type = HotSpotKlassOop::type(obj); |
784 klassOop klass = java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(type)); | |
785 *((jobject*) operand) = JNIHandles::make_local(klass); | |
784 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); | 786 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); |
785 TRACE_graal_3("relocating (HotSpotJavaType) at %016x/%016x", instruction, operand); | 787 TRACE_graal_3("relocating (HotSpotJavaType) at %016x/%016x", instruction, operand); |
786 } else { | 788 } else { |
787 jobject value = JNIHandles::make_local(obj()); | 789 jobject value = JNIHandles::make_local(obj()); |
788 if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) { | 790 if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) { |