diff jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java @ 23989:115d4e0d7b87

removed HotSpotResolvedJavaFieldImpl.name field
author Doug Simon <doug.simon@oracle.com>
date Thu, 26 Jan 2017 13:02:37 +0100
parents 6d2c72b822b0
children 1b8892b4ce9c
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java	Wed Jan 25 16:39:01 2017 +0100
+++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java	Thu Jan 26 13:02:37 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -277,17 +277,19 @@
      * {@code constantPool}. The values returned in {@code info} are:
      *
      * <pre>
-     *     [(int) flags,   // only valid if field is resolved
-     *      (int) offset]  // only valid if field is resolved
+     *     [ flags,  // fieldDescriptor::access_flags()
+     *       offset, // fieldDescriptor::offset()
+     *       index   // fieldDescriptor::index()
+     *     ]
      * </pre>
      *
-     * The behavior of this method is undefined if {@code cpi} does not denote a
-     * {@code JVM_CONSTANT_Field} entry.
+     * The values encoded in {@code info} are only valid if the field is resolved. The behavior of
+     * this method is undefined if {@code cpi} does not denote a {@code JVM_CONSTANT_Field} entry.
      *
      * @param info an array in which the details of the field are returned
      * @return the type defining the field if resolution is successful, 0 otherwise
      */
-    native HotSpotResolvedObjectTypeImpl resolveFieldInPool(HotSpotConstantPool constantPool, int cpi, byte opcode, long[] info);
+    native HotSpotResolvedObjectTypeImpl resolveFieldInPool(HotSpotConstantPool constantPool, int cpi, byte opcode, int[] info);
 
     /**
      * Converts {@code cpci} from an index into the cache for {@code constantPool} to an index
@@ -494,6 +496,13 @@
     native String getSymbol(long metaspaceSymbol);
 
     /**
+     * Gets the name of the field at index {@code index} in the fields array of {@code type}.
+     *
+     * @throws ArrayIndexOutOfBoundsException if {@code index} is out of bounds of the fields array
+     */
+    native String getFieldName(HotSpotResolvedObjectTypeImpl holder, int index);
+
+    /**
      * Looks for the next Java stack frame matching an entry in {@code methods}.
      *
      * @param frame the starting point of the search, where {@code null} refers to the topmost frame