6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
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 "gc/shared/gcLocker.hpp"
27 #include "interpreter/bytecodes.hpp"
28 #include "interpreter/interpreter.hpp"
29 #include "interpreter/rewriter.hpp"
30 #include "memory/metadataFactory.hpp"
31 #include "memory/resourceArea.hpp"
32 #include "oops/generateOopMap.hpp"
33 #include "prims/methodHandles.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) {
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
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) {
|