equal
deleted
inserted
replaced
27 |
27 |
28 #include "oops/cpCache.hpp" |
28 #include "oops/cpCache.hpp" |
29 #include "oops/oopHandle.inline.hpp" |
29 #include "oops/oopHandle.inline.hpp" |
30 #include "runtime/orderAccess.hpp" |
30 #include "runtime/orderAccess.hpp" |
31 |
31 |
32 inline int ConstantPoolCacheEntry::indices_ord() const { return OrderAccess::load_acquire(&_indices); } |
32 inline int ConstantPoolCacheEntry::indices_ord() const { return Atomic::load_acquire(&_indices); } |
33 |
33 |
34 inline Bytecodes::Code ConstantPoolCacheEntry::bytecode_1() const { |
34 inline Bytecodes::Code ConstantPoolCacheEntry::bytecode_1() const { |
35 return Bytecodes::cast((indices_ord() >> bytecode_1_shift) & bytecode_1_mask); |
35 return Bytecodes::cast((indices_ord() >> bytecode_1_shift) & bytecode_1_mask); |
36 } |
36 } |
37 |
37 |
51 inline Method* ConstantPoolCacheEntry::f2_as_interface_method() const { |
51 inline Method* ConstantPoolCacheEntry::f2_as_interface_method() const { |
52 assert(bytecode_1() == Bytecodes::_invokeinterface, ""); |
52 assert(bytecode_1() == Bytecodes::_invokeinterface, ""); |
53 return (Method*)_f2; |
53 return (Method*)_f2; |
54 } |
54 } |
55 |
55 |
56 inline Metadata* ConstantPoolCacheEntry::f1_ord() const { return (Metadata *)OrderAccess::load_acquire(&_f1); } |
56 inline Metadata* ConstantPoolCacheEntry::f1_ord() const { return (Metadata *)Atomic::load_acquire(&_f1); } |
57 |
57 |
58 inline Method* ConstantPoolCacheEntry::f1_as_method() const { |
58 inline Method* ConstantPoolCacheEntry::f1_as_method() const { |
59 Metadata* f1 = f1_ord(); assert(f1 == NULL || f1->is_method(), ""); |
59 Metadata* f1 = f1_ord(); assert(f1 == NULL || f1->is_method(), ""); |
60 return (Method*)f1; |
60 return (Method*)f1; |
61 } |
61 } |
73 |
73 |
74 inline bool ConstantPoolCacheEntry::has_local_signature() const { |
74 inline bool ConstantPoolCacheEntry::has_local_signature() const { |
75 return (!is_f1_null()) && (_flags & (1 << has_local_signature_shift)) != 0; |
75 return (!is_f1_null()) && (_flags & (1 << has_local_signature_shift)) != 0; |
76 } |
76 } |
77 |
77 |
78 inline intx ConstantPoolCacheEntry::flags_ord() const { return (intx)OrderAccess::load_acquire(&_flags); } |
78 inline intx ConstantPoolCacheEntry::flags_ord() const { return (intx)Atomic::load_acquire(&_flags); } |
79 |
79 |
80 inline bool ConstantPoolCacheEntry::indy_resolution_failed() const { |
80 inline bool ConstantPoolCacheEntry::indy_resolution_failed() const { |
81 intx flags = flags_ord(); |
81 intx flags = flags_ord(); |
82 return (flags & (1 << indy_resolution_failed_shift)) != 0; |
82 return (flags & (1 << indy_resolution_failed_shift)) != 0; |
83 } |
83 } |