comparison src/share/vm/opto/library_call.cpp @ 4899:a79cb7c55012

7132690: InstanceKlass:_reference_type should be u1 type Summary: Change InstanceKlass::_reference_type to u1 type. Reviewed-by: dholmes, coleenp, acorn Contributed-by: Jiangli Zhou <jiangli.zhou@oracle.com>
author jiangli
date Wed, 25 Jan 2012 17:40:51 -0500
parents 35acf8f0a2e4
children f174909614bd
comparison
equal deleted inserted replaced
4814:5f3fcd591768 4899:a79cb7c55012
2151 // The compile time filters did not reject base_oop/offset so 2151 // The compile time filters did not reject base_oop/offset so
2152 // we need to generate the following runtime filters 2152 // we need to generate the following runtime filters
2153 // 2153 //
2154 // if (offset == java_lang_ref_Reference::_reference_offset) { 2154 // if (offset == java_lang_ref_Reference::_reference_offset) {
2155 // if (base != null) { 2155 // if (base != null) {
2156 // if (klass(base)->reference_type() != REF_NONE)) { 2156 // if (instance_of(base, java.lang.ref.Reference)) {
2157 // pre_barrier(_, pre_val, ...); 2157 // pre_barrier(_, pre_val, ...);
2158 // } 2158 // }
2159 // } 2159 // }
2160 // } 2160 // }
2161 2161
2162 float likely = PROB_LIKELY(0.999); 2162 float likely = PROB_LIKELY(0.999);
2163 float unlikely = PROB_UNLIKELY(0.999); 2163 float unlikely = PROB_UNLIKELY(0.999);
2164 2164
2165 IdealKit ideal(this); 2165 IdealKit ideal(this);
2166 #define __ ideal. 2166 #define __ ideal.
2167
2168 const int reference_type_offset = in_bytes(instanceKlass::reference_type_offset());
2169 2167
2170 Node* referent_off = __ ConX(java_lang_ref_Reference::referent_offset); 2168 Node* referent_off = __ ConX(java_lang_ref_Reference::referent_offset);
2171 2169
2172 __ if_then(offset, BoolTest::eq, referent_off, unlikely); { 2170 __ if_then(offset, BoolTest::eq, referent_off, unlikely); {
2173 __ if_then(base_oop, BoolTest::ne, null(), likely); { 2171 __ if_then(base_oop, BoolTest::ne, null(), likely); {