0N/A/*
2027N/A * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
1879N/A#include "precompiled.hpp"
1879N/A#include "interpreter/bytecodes.hpp"
1879N/A#include "interpreter/interpreter.hpp"
1879N/A#include "interpreter/rewriter.hpp"
1879N/A#include "memory/gcLocker.hpp"
1879N/A#include "memory/oopFactory.hpp"
1879N/A#include "memory/resourceArea.hpp"
1879N/A#include "oops/generateOopMap.hpp"
1879N/A#include "oops/objArrayOop.hpp"
1879N/A#include "oops/oop.inline.hpp"
1879N/A#include "prims/methodComparator.hpp"
3932N/A#include "prims/methodHandles.hpp"
0N/A
726N/A// Computes a CPC map (new_index -> original_index) for constant pool entries
0N/A// that are referred to by the interpreter at runtime via the constant pool cache.
726N/A// Also computes a CP map (original_index -> new_index).
726N/A// Marks entries in CP which require additional processing.
726N/Avoid Rewriter::compute_index_maps() {
726N/A const int length = _pool->length();
726N/A init_cp_map(length);
3932N/A bool saw_mh_symbol = false;
0N/A for (int i = 0; i < length; i++) {
726N/A int tag = _pool->tag_at(i).value();
726N/A switch (tag) {
726N/A case JVM_CONSTANT_InterfaceMethodref:
0N/A case JVM_CONSTANT_Fieldref : // fall through
0N/A case JVM_CONSTANT_Methodref : // fall through
1522N/A case JVM_CONSTANT_MethodHandle : // fall through
1522N/A case JVM_CONSTANT_MethodType : // fall through
1580N/A case JVM_CONSTANT_InvokeDynamic : // fall through
726N/A add_cp_cache_entry(i);
726N/A break;
3932N/A case JVM_CONSTANT_Utf8:
3932N/A if (_pool->symbol_at(i) == vmSymbols::java_lang_invoke_MethodHandle())
3932N/A saw_mh_symbol = true;
3932N/A break;
0N/A }
0N/A }
726N/A
726N/A guarantee((int)_cp_cache_map.length()-1 <= (int)((u2)-1),
726N/A "all cp cache indexes fit in a u2");
Error!

 

There was an error!

null

java.lang.NullPointerException