changeset 22605:f0ec628cb987

fixed javadoc for lookupNameRefInPool and lookupSignatureRefInPool in CompilerToVM and renamed them to lookupNameInPool and lookupSignatureInPool
author Doug Simon <doug.simon@oracle.com>
date Thu, 24 Sep 2015 00:27:14 +0200
parents 479228019e48
children 41da626860a3
files jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompilerToVM.java jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotConstantPool.java src/share/vm/jvmci/jvmciCompilerToVM.cpp
diffstat 3 files changed, 29 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompilerToVM.java	Wed Sep 23 15:43:53 2015 +0200
+++ b/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompilerToVM.java	Thu Sep 24 00:27:14 2015 +0200
@@ -187,22 +187,22 @@
     native int lookupNameAndTypeRefIndexInPool(HotSpotConstantPool constantPool, int cpi);
 
     /**
-     * Gets the name of the {@code JVM_CONSTANT_NameAndType} entry at index {@code cpi} in
-     * {@code constantPool}.
+     * Gets the name of the {@code JVM_CONSTANT_NameAndType} entry referenced by another entry
+     * denoted by {@code which} in {@code constantPool}.
      *
-     * The behavior of this method is undefined if {@code cpi} does not denote a
-     * {@code JVM_CONSTANT_NameAndType} entry.
+     * The behavior of this method is undefined if {@code which} does not denote a entry that
+     * references a {@code JVM_CONSTANT_NameAndType} entry.
      */
-    native String lookupNameRefInPool(HotSpotConstantPool constantPool, int cpi);
+    native String lookupNameInPool(HotSpotConstantPool constantPool, int which);
 
     /**
-     * Gets the signature of the {@code JVM_CONSTANT_NameAndType} entry at index {@code cpi} in
-     * {@code constantPool}.
+     * Gets the signature of the {@code JVM_CONSTANT_NameAndType} entry referenced by another entry
+     * denoted by {@code which} in {@code constantPool}.
      *
-     * The behavior of this method is undefined if {@code cpi} does not denote a
-     * {@code JVM_CONSTANT_NameAndType} entry.
+     * The behavior of this method is undefined if {@code which} does not denote a entry that
+     * references a {@code JVM_CONSTANT_NameAndType} entry.
      */
-    native String lookupSignatureRefInPool(HotSpotConstantPool constantPool, int cpi);
+    native String lookupSignatureInPool(HotSpotConstantPool constantPool, int which);
 
     /**
      * Gets the {@code JVM_CONSTANT_Class} index from the entry at index {@code cpi} in
--- a/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotConstantPool.java	Wed Sep 23 15:43:53 2015 +0200
+++ b/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotConstantPool.java	Thu Sep 24 00:27:14 2015 +0200
@@ -368,14 +368,14 @@
     }
 
     /**
-     * Gets the name of a {@code JVM_CONSTANT_NameAndType} constant pool entry at index
-     * {@code index}.
+     * Gets the name of a {@code JVM_CONSTANT_NameAndType} constant pool entry referenced by another
+     * entry denoted by {@code which}.
      *
-     * @param index constant pool index
+     * @param which constant pool index or constant pool cache index
      * @return name as {@link String}
      */
-    private String getNameRefAt(int index) {
-        return compilerToVM().lookupNameRefInPool(this, index);
+    private String getNameOf(int which) {
+        return compilerToVM().lookupNameInPool(this, which);
     }
 
     /**
@@ -392,14 +392,14 @@
     }
 
     /**
-     * Gets the signature of a {@code JVM_CONSTANT_NameAndType} constant pool entry at index
-     * {@code index}.
+     * Gets the signature of a {@code JVM_CONSTANT_NameAndType} constant pool entry referenced by
+     * another entry denoted by {@code which}.
      *
-     * @param index constant pool index
+     * @param which constant pool index or constant pool cache index
      * @return signature as {@link String}
      */
-    private String getSignatureRefAt(int index) {
-        return compilerToVM().lookupSignatureRefInPool(this, index);
+    private String getSignatureOf(int which) {
+        return compilerToVM().lookupSignatureInPool(this, which);
     }
 
     /**
@@ -557,8 +557,8 @@
             return method;
         } else {
             // Get the method's name and signature.
-            String name = getNameRefAt(index);
-            HotSpotSignature signature = new HotSpotSignature(runtime(), getSignatureRefAt(index));
+            String name = getNameOf(index);
+            HotSpotSignature signature = new HotSpotSignature(runtime(), getSignatureOf(index));
             if (opcode == Bytecodes.INVOKEDYNAMIC) {
                 HotSpotResolvedObjectType holder = HotSpotResolvedObjectTypeImpl.fromObjectClass(MethodHandle.class);
                 return new HotSpotMethodUnresolved(name, signature, holder);
@@ -703,7 +703,7 @@
 
     private boolean isInvokeHandle(int methodRefCacheIndex, HotSpotResolvedObjectTypeImpl klass) {
         assertTag(compilerToVM().constantPoolRemapInstructionOperandFromCache(this, methodRefCacheIndex), JVM_CONSTANT.MethodRef);
-        return ResolvedJavaMethod.isSignaturePolymorphic(klass, getNameRefAt(methodRefCacheIndex), runtime().getHostJVMCIBackend().getMetaAccess());
+        return ResolvedJavaMethod.isSignaturePolymorphic(klass, getNameOf(methodRefCacheIndex), runtime().getHostJVMCIBackend().getMetaAccess());
     }
 
     @Override
--- a/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Wed Sep 23 15:43:53 2015 +0200
+++ b/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Thu Sep 24 00:27:14 2015 +0200
@@ -378,15 +378,15 @@
   return cp->name_and_type_ref_index_at(index);
 C2V_END
 
-C2V_VMENTRY(jobject, lookupNameRefInPool, (JNIEnv*, jobject, jobject jvmci_constant_pool, jint index))
+C2V_VMENTRY(jobject, lookupNameInPool, (JNIEnv*, jobject, jobject jvmci_constant_pool, jint which))
   constantPoolHandle cp = CompilerToVM::asConstantPool(jvmci_constant_pool);
-  Handle sym = java_lang_String::create_from_symbol(cp->name_ref_at(index), CHECK_NULL);
+  Handle sym = java_lang_String::create_from_symbol(cp->name_ref_at(which), CHECK_NULL);
   return JNIHandles::make_local(THREAD, sym());
 C2V_END
 
-C2V_VMENTRY(jobject, lookupSignatureRefInPool, (JNIEnv*, jobject, jobject jvmci_constant_pool, jint index))
+C2V_VMENTRY(jobject, lookupSignatureInPool, (JNIEnv*, jobject, jobject jvmci_constant_pool, jint which))
   constantPoolHandle cp = CompilerToVM::asConstantPool(jvmci_constant_pool);
-  Handle sym = java_lang_String::create_from_symbol(cp->signature_ref_at(index), CHECK_NULL);
+  Handle sym = java_lang_String::create_from_symbol(cp->signature_ref_at(which), CHECK_NULL);
   return JNIHandles::make_local(THREAD, sym());
 C2V_END
 
@@ -1181,9 +1181,9 @@
   {CC"canInlineMethod",                              CC"("HS_RESOLVED_METHOD")Z",                                                      FN_PTR(canInlineMethod)},
   {CC"shouldInlineMethod",                           CC"("HS_RESOLVED_METHOD")Z",                                                      FN_PTR(shouldInlineMethod)},
   {CC"lookupType",                                   CC"("STRING CLASS"Z)"HS_RESOLVED_KLASS,                                           FN_PTR(lookupType)},
-  {CC"lookupNameRefInPool",                          CC"("HS_CONSTANT_POOL"I)"STRING,                                                  FN_PTR(lookupNameRefInPool)},
+  {CC"lookupNameInPool",                             CC"("HS_CONSTANT_POOL"I)"STRING,                                                  FN_PTR(lookupNameInPool)},
   {CC"lookupNameAndTypeRefIndexInPool",              CC"("HS_CONSTANT_POOL"I)I",                                                       FN_PTR(lookupNameAndTypeRefIndexInPool)},
-  {CC"lookupSignatureRefInPool",                     CC"("HS_CONSTANT_POOL"I)"STRING,                                                  FN_PTR(lookupSignatureRefInPool)},
+  {CC"lookupSignatureInPool",                        CC"("HS_CONSTANT_POOL"I)"STRING,                                                  FN_PTR(lookupSignatureInPool)},
   {CC"lookupKlassRefIndexInPool",                    CC"("HS_CONSTANT_POOL"I)I",                                                       FN_PTR(lookupKlassRefIndexInPool)},
   {CC"lookupKlassInPool",                            CC"("HS_CONSTANT_POOL"I)Ljava/lang/Object;",                                      FN_PTR(lookupKlassInPool)},
   {CC"lookupAppendixInPool",                         CC"("HS_CONSTANT_POOL"I)"OBJECT,                                                  FN_PTR(lookupAppendixInPool)},