am d325011f: Shift register index tests to static pass.
* commit 'd325011fc98e0f1179d467bbc284cccea72f560b':
Shift register index tests to static pass.
diff --git a/dx/src/com/android/dx/dex/code/Dops.java b/dx/src/com/android/dx/dex/code/Dops.java
index 0211a40..ba0affb 100644
--- a/dx/src/com/android/dx/dex/code/Dops.java
+++ b/dx/src/com/android/dx/dex/code/Dops.java
@@ -1172,7 +1172,8 @@
/**
* Gets the {@link Dop} for the given opcode value.
*
- * @param opcode {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode value
+ * @param opcode {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the
+ * opcode value
* @return {@code non-null;} the associated opcode instance
*/
public static Dop get(int opcode) {
@@ -1194,7 +1195,8 @@
* Gets the {@link Dop} with the given family/format combination, if
* any.
*
- * @param family {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode family
+ * @param family {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the
+ * opcode family
* @param format {@code non-null;} the opcode's instruction format
* @return {@code null-ok;} the corresponding opcode, or {@code null} if
* there is none
diff --git a/vm/Jni.c b/vm/Jni.c
index 3b24e13..a7d460f 100644
--- a/vm/Jni.c
+++ b/vm/Jni.c
@@ -2409,17 +2409,15 @@
meth = NULL;
}
if (meth == NULL) {
- LOGD("GetMethodID: method not found: %s.%s:%s\n",
- clazz->descriptor, name, sig);
- dvmThrowException("Ljava/lang/NoSuchMethodError;", name);
- }
-
- /*
- * The method's class may not be the same as clazz, but if
- * it isn't this must be a virtual method and the class must
- * be a superclass (and, hence, already initialized).
- */
- if (meth != NULL) {
+ dvmThrowExceptionFmt("Ljava/lang/NoSuchMethodError;",
+ "no method with name='%s' signature='%s' in class %s",
+ name, sig, clazz->descriptor);
+ } else {
+ /*
+ * The method's class may not be the same as clazz, but if
+ * it isn't this must be a virtual method and the class must
+ * be a superclass (and, hence, already initialized).
+ */
assert(dvmIsClassInitialized(meth->clazz) ||
dvmIsClassInitializing(meth->clazz));
}
@@ -2432,8 +2430,8 @@
/*
* Get a field ID (instance fields).
*/
-static jfieldID GetFieldID(JNIEnv* env, jclass jclazz,
- const char* name, const char* sig)
+static jfieldID GetFieldID(JNIEnv* env, jclass jclazz, const char* name,
+ const char* sig)
{
JNI_ENTER();
@@ -2446,9 +2444,9 @@
} else {
id = (jfieldID) dvmFindInstanceFieldHier(clazz, name, sig);
if (id == NULL) {
- LOGD("GetFieldID: unable to find field %s.%s:%s\n",
- clazz->descriptor, name, sig);
- dvmThrowException("Ljava/lang/NoSuchFieldError;", name);
+ dvmThrowExceptionFmt("Ljava/lang/NoSuchFieldError;",
+ "no field with name='%s' signature='%s' in class %s",
+ name, sig, clazz->descriptor);
}
}
JNI_EXIT();
@@ -2487,8 +2485,11 @@
}
id = (jmethodID) meth;
- if (id == NULL)
- dvmThrowException("Ljava/lang/NoSuchMethodError;", name);
+ if (id == NULL) {
+ dvmThrowExceptionFmt("Ljava/lang/NoSuchMethodError;",
+ "no static method with name='%s' signature='%s' in class %s",
+ name, sig, clazz->descriptor);
+ }
}
JNI_EXIT();
@@ -2511,8 +2512,11 @@
id = NULL;
} else {
id = (jfieldID) dvmFindStaticField(clazz, name, sig);
- if (id == NULL)
- dvmThrowException("Ljava/lang/NoSuchFieldError;", name);
+ if (id == NULL) {
+ dvmThrowExceptionFmt("Ljava/lang/NoSuchFieldError;",
+ "no static field with name='%s' signature='%s' in class %s",
+ name, sig, clazz->descriptor);
+ }
}
JNI_EXIT();
return id;