equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * Copyright (c) 2016 SAP SE. All rights reserved. |
3 * Copyright (c) 2016 SAP SE. All rights reserved. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * |
5 * |
6 * This code is free software; you can redistribute it and/or modify it |
6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as |
7 * under the terms of the GNU General Public License version 2 only, as |
102 } |
102 } |
103 |
103 |
104 // Creation also verifies the object. |
104 // Creation also verifies the object. |
105 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + NativeCall::get_IC_pos_in_java_to_interp_stub()); |
105 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + NativeCall::get_IC_pos_in_java_to_interp_stub()); |
106 NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); |
106 NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); |
107 |
107 verify_mt_safe(callee, entry, method_holder, jump); |
108 #ifdef ASSERT |
|
109 // A generated lambda form might be deleted from the Lambdaform |
|
110 // cache in MethodTypeForm. If a jit compiled lambdaform method |
|
111 // becomes not entrant and the cache access returns null, the new |
|
112 // resolve will lead to a new generated LambdaForm. |
|
113 volatile intptr_t data = method_holder->data(); |
|
114 volatile address destination = jump->jump_destination(); |
|
115 assert(data == 0 || data == (intptr_t)callee() || callee->is_compiled_lambda_form(), |
|
116 "a) MT-unsafe modification of inline cache"); |
|
117 assert(destination == (address)-1 || destination == entry, |
|
118 "b) MT-unsafe modification of inline cache"); |
|
119 #endif |
|
120 |
108 |
121 // Update stub. |
109 // Update stub. |
122 method_holder->set_data((intptr_t)callee(), relocInfo::metadata_type); |
110 method_holder->set_data((intptr_t)callee(), relocInfo::metadata_type); |
123 jump->set_jump_destination(entry); |
111 jump->set_jump_destination(entry); |
124 |
112 |