1 /* |
1 /* |
2 * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2007, 2016, 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. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
117 public static final int CONSTANT_MethodHandle = 15; |
117 public static final int CONSTANT_MethodHandle = 15; |
118 public static final int CONSTANT_MethodType = 16; |
118 public static final int CONSTANT_MethodType = 16; |
119 public static final int CONSTANT_InvokeDynamic = 18; |
119 public static final int CONSTANT_InvokeDynamic = 18; |
120 |
120 |
121 public static enum RefKind { |
121 public static enum RefKind { |
122 REF_getField(1, "getfield"), |
122 REF_getField(1), |
123 REF_getStatic(2, "getstatic"), |
123 REF_getStatic(2), |
124 REF_putField(3, "putfield"), |
124 REF_putField(3), |
125 REF_putStatic(4, "putstatic"), |
125 REF_putStatic(4), |
126 REF_invokeVirtual(5, "invokevirtual"), |
126 REF_invokeVirtual(5), |
127 REF_invokeStatic(6, "invokestatic"), |
127 REF_invokeStatic(6), |
128 REF_invokeSpecial(7, "invokespecial"), |
128 REF_invokeSpecial(7), |
129 REF_newInvokeSpecial(8, "newinvokespecial"), |
129 REF_newInvokeSpecial(8), |
130 REF_invokeInterface(9, "invokeinterface"); |
130 REF_invokeInterface(9); |
131 |
131 |
132 public final int tag; |
132 public final int tag; |
133 public final String name; |
133 |
134 |
134 RefKind(int tag) { |
135 RefKind(int tag, String name) { |
|
136 this.tag = tag; |
135 this.tag = tag; |
137 this.name = name; |
|
138 } |
136 } |
139 |
137 |
140 static RefKind getRefkind(int tag) { |
138 static RefKind getRefkind(int tag) { |
141 switch(tag) { |
139 switch(tag) { |
142 case 1: |
140 case 1: |