equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
155 } |
155 } |
156 |
156 |
157 // Creation also verifies the object. |
157 // Creation also verifies the object. |
158 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); |
158 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); |
159 NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); |
159 NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); |
160 |
160 verify_mt_safe(callee, entry, method_holder, jump); |
161 #ifdef ASSERT |
|
162 Method* old_method = reinterpret_cast<Method*>(method_holder->data()); |
|
163 address destination = jump->jump_destination(); |
|
164 assert(old_method == NULL || old_method == callee() || |
|
165 !old_method->method_holder()->is_loader_alive(), |
|
166 "a) MT-unsafe modification of inline cache"); |
|
167 assert(destination == (address)-1 || destination == entry, |
|
168 "b) MT-unsafe modification of inline cache"); |
|
169 #endif |
|
170 |
161 |
171 // Update stub. |
162 // Update stub. |
172 method_holder->set_data((intptr_t)callee()); |
163 method_holder->set_data((intptr_t)callee()); |
173 jump->set_jump_destination(entry); |
164 jump->set_jump_destination(entry); |
174 |
165 |