13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "interpreter/bytecodes.hpp"
27 #include "interpreter/interpreter.hpp"
28 #include "interpreter/rewriter.hpp"
29 #include "memory/metadataFactory.hpp"
30 #include "memory/resourceArea.hpp"
31 #include "oops/generateOopMap.hpp"
32 #include "prims/methodHandles.hpp"
33 #include "runtime/handles.inline.hpp"
34
35 // Computes a CPC map (new_index -> original_index) for constant pool entries
36 // that are referred to by the interpreter at runtime via the constant pool cache.
37 // Also computes a CP map (original_index -> new_index).
38 // Marks entries in CP which require additional processing.
39 void Rewriter::compute_index_maps() {
40 const int length = _pool->length();
41 init_maps(length);
42 bool saw_mh_symbol = false;
43 for (int i = 0; i < length; i++) {
44 int tag = _pool->tag_at(i).value();
45 switch (tag) {
46 case JVM_CONSTANT_InterfaceMethodref:
47 case JVM_CONSTANT_Fieldref : // fall through
48 case JVM_CONSTANT_Methodref : // fall through
49 add_cp_cache_entry(i);
50 break;
51 case JVM_CONSTANT_Dynamic:
52 assert(_pool->has_dynamic_constant(), "constant pool's _has_dynamic_constant flag not set");
|
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "interpreter/bytecodes.hpp"
27 #include "interpreter/interpreter.hpp"
28 #include "interpreter/rewriter.hpp"
29 #include "memory/metadataFactory.hpp"
30 #include "memory/resourceArea.hpp"
31 #include "oops/generateOopMap.hpp"
32 #include "prims/methodHandles.hpp"
33 #include "runtime/fieldDescriptor.inline.hpp"
34 #include "runtime/handles.inline.hpp"
35
36 // Computes a CPC map (new_index -> original_index) for constant pool entries
37 // that are referred to by the interpreter at runtime via the constant pool cache.
38 // Also computes a CP map (original_index -> new_index).
39 // Marks entries in CP which require additional processing.
40 void Rewriter::compute_index_maps() {
41 const int length = _pool->length();
42 init_maps(length);
43 bool saw_mh_symbol = false;
44 for (int i = 0; i < length; i++) {
45 int tag = _pool->tag_at(i).value();
46 switch (tag) {
47 case JVM_CONSTANT_InterfaceMethodref:
48 case JVM_CONSTANT_Fieldref : // fall through
49 case JVM_CONSTANT_Methodref : // fall through
50 add_cp_cache_entry(i);
51 break;
52 case JVM_CONSTANT_Dynamic:
53 assert(_pool->has_dynamic_constant(), "constant pool's _has_dynamic_constant flag not set");
|