1 /* |
1 /* |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2018, 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. |
105 set_lock(NULL); |
105 set_lock(NULL); |
106 } |
106 } |
107 |
107 |
108 objArrayOop ConstantPool::resolved_references() const { |
108 objArrayOop ConstantPool::resolved_references() const { |
109 return (objArrayOop)JNIHandles::resolve(_resolved_references); |
109 return (objArrayOop)JNIHandles::resolve(_resolved_references); |
|
110 } |
|
111 |
|
112 // Called from outside constant pool resolution where a resolved_reference array |
|
113 // may not be present. |
|
114 objArrayOop ConstantPool::resolved_references_or_null() const { |
|
115 if (_cache == NULL) { |
|
116 return NULL; |
|
117 } else { |
|
118 return (objArrayOop)JNIHandles::resolve(_resolved_references); |
|
119 } |
110 } |
120 } |
111 |
121 |
112 // Create resolved_references array and mapping array for original cp indexes |
122 // Create resolved_references array and mapping array for original cp indexes |
113 // The ldc bytecode was rewritten to have the resolved reference array index so need a way |
123 // The ldc bytecode was rewritten to have the resolved reference array index so need a way |
114 // to map it back for resolving and some unlikely miscellaneous uses. |
124 // to map it back for resolving and some unlikely miscellaneous uses. |