# HG changeset patch # User Doug Simon # Date 1466029539 -7200 # Node ID d814713e3b0288d18a355d7b48bcd300d1e6834f # Parent 8e2954d781617947e2d0acedb14741b40b5465dd backport of changes from JDK-8157181 diff -r 8e2954d78161 -r d814713e3b02 jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java --- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java Thu Jun 16 00:25:11 2016 +0200 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java Thu Jun 16 00:25:39 2016 +0200 @@ -589,7 +589,7 @@ } @Override - public JavaField lookupField(int cpi, int opcode) { + public JavaField lookupField(int cpi, ResolvedJavaMethod method, int opcode) { final int index = rawIndexToConstantPoolIndex(cpi, opcode); final int nameAndTypeIndex = getNameAndTypeRefIndexAt(index); final int nameIndex = getNameRefIndexAt(nameAndTypeIndex); diff -r 8e2954d78161 -r d814713e3b02 jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java --- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java Thu Jun 16 00:25:11 2016 +0200 +++ b/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java Thu Jun 16 00:25:39 2016 +0200 @@ -48,16 +48,18 @@ /** * Looks up a reference to a field. If {@code opcode} is non-negative, then resolution checks - * specific to the bytecode it denotes are performed if the field is already resolved. Should - * any of these checks fail, an unresolved field reference is returned. + * specific to the bytecode it denotes are performed if the field is already resolved. Checks + * for some bytecodes require the method that contains the bytecode to be specified. Should any + * of these checks fail, an unresolved field reference is returned. * * @param cpi the constant pool index * @param opcode the opcode of the instruction for which the lookup is being performed or * {@code -1} + * @param method the method for which the lookup is being performed * @return a reference to the field at {@code cpi} in this pool * @throws ClassFormatError if the entry at {@code cpi} is not a field */ - JavaField lookupField(int cpi, int opcode); + JavaField lookupField(int cpi, ResolvedJavaMethod method, int opcode); /** * Looks up a reference to a method. If {@code opcode} is non-negative, then resolution checks