27 |
27 |
28 #include "oops/method.hpp" |
28 #include "oops/method.hpp" |
29 #include "runtime/orderAccess.hpp" |
29 #include "runtime/orderAccess.hpp" |
30 |
30 |
31 inline address Method::from_compiled_entry() const { |
31 inline address Method::from_compiled_entry() const { |
32 return OrderAccess::load_acquire(&_from_compiled_entry); |
32 return Atomic::load_acquire(&_from_compiled_entry); |
33 } |
33 } |
34 |
34 |
35 inline address Method::from_interpreted_entry() const { |
35 inline address Method::from_interpreted_entry() const { |
36 return OrderAccess::load_acquire(&_from_interpreted_entry); |
36 return Atomic::load_acquire(&_from_interpreted_entry); |
37 } |
37 } |
38 |
38 |
39 inline void Method::set_method_data(MethodData* data) { |
39 inline void Method::set_method_data(MethodData* data) { |
40 // The store into method must be released. On platforms without |
40 // The store into method must be released. On platforms without |
41 // total store order (TSO) the reference may become visible before |
41 // total store order (TSO) the reference may become visible before |
42 // the initialization of data otherwise. |
42 // the initialization of data otherwise. |
43 OrderAccess::release_store(&_method_data, data); |
43 Atomic::release_store(&_method_data, data); |
44 } |
44 } |
45 |
45 |
46 inline CompiledMethod* volatile Method::code() const { |
46 inline CompiledMethod* volatile Method::code() const { |
47 assert( check_code(), "" ); |
47 assert( check_code(), "" ); |
48 return OrderAccess::load_acquire(&_code); |
48 return Atomic::load_acquire(&_code); |
49 } |
49 } |
50 |
50 |
51 // Write (bci, line number) pair to stream |
51 // Write (bci, line number) pair to stream |
52 inline void CompressedLineNumberWriteStream::write_pair_regular(int bci_delta, int line_delta) { |
52 inline void CompressedLineNumberWriteStream::write_pair_regular(int bci_delta, int line_delta) { |
53 // bci and line number does not compress into single byte. |
53 // bci and line number does not compress into single byte. |