equal
deleted
inserted
replaced
90 // Creation also verifies the object. |
90 // Creation also verifies the object. |
91 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); |
91 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); |
92 #ifndef PRODUCT |
92 #ifndef PRODUCT |
93 NativeGeneralJump* jump = nativeGeneralJump_at(method_holder->next_instruction_address()); |
93 NativeGeneralJump* jump = nativeGeneralJump_at(method_holder->next_instruction_address()); |
94 |
94 |
95 assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee(), |
95 // read the value once |
|
96 volatile intptr_t data = method_holder->data(); |
|
97 assert(data == 0 || data == (intptr_t)callee(), |
96 "a) MT-unsafe modification of inline cache"); |
98 "a) MT-unsafe modification of inline cache"); |
97 assert(method_holder->data() == 0 || jump->jump_destination() == entry, |
99 assert(data == 0 || jump->jump_destination() == entry, |
98 "b) MT-unsafe modification of inline cache"); |
100 "b) MT-unsafe modification of inline cache"); |
99 #endif |
101 #endif |
100 // Update stub. |
102 // Update stub. |
101 method_holder->set_data((intptr_t)callee()); |
103 method_holder->set_data((intptr_t)callee()); |
102 NativeGeneralJump::insert_unconditional(method_holder->next_instruction_address(), entry); |
104 NativeGeneralJump::insert_unconditional(method_holder->next_instruction_address(), entry); |