Added throw-verification-error instruction.
This is for the deferred verifier error reporting. It replaces OP_UNUSED_ED.
The instructions aren't actually used yet, which is good since the x86
version hasn't been written yet.
The mterp regen also pushed out some recent-ish changes that hadn't
propagated to the armv4t sources.
diff --git a/vm/analysis/CodeVerify.c b/vm/analysis/CodeVerify.c
index 97d98d7..79d1257 100644
--- a/vm/analysis/CodeVerify.c
+++ b/vm/analysis/CodeVerify.c
@@ -3544,6 +3544,9 @@
* can't reject them. We can ask the optimizer to replace the
* instructions with a magic "always throw InstantiationError"
* instruction. (Not enough bytes to sub in a method call.)
+ *
+ * TODO (xyz): check for abstract/interface, cause an
+ * InstantiationError to be thrown.
*/
resClass = dvmOptResolveClass(meth->clazz, decInsn.vB, &failure);
if (resClass == NULL) {
@@ -5111,6 +5114,7 @@
* If the object reference was null, the field-get returns the "wildcard"
* type, which is acceptable for any operation.
*/
+ case OP_THROW_VERIFICATION_ERROR:
case OP_EXECUTE_INLINE:
case OP_INVOKE_DIRECT_EMPTY:
case OP_IGET_QUICK:
@@ -5146,7 +5150,6 @@
case OP_UNUSED_EA:
case OP_UNUSED_EB:
case OP_UNUSED_EC:
- case OP_UNUSED_ED:
case OP_UNUSED_EF:
case OP_UNUSED_F1:
case OP_UNUSED_FC:
diff --git a/vm/analysis/DexOptimize.h b/vm/analysis/DexOptimize.h
index 27ab327..c07dea1 100644
--- a/vm/analysis/DexOptimize.h
+++ b/vm/analysis/DexOptimize.h
@@ -41,7 +41,7 @@
*/
typedef enum VerifyError {
VERIFY_ERROR_NONE = 0, /* no error; must be zero */
- VERIFY_ERROR_GENERIC, /* failed, details not important */
+ VERIFY_ERROR_GENERIC, /* VerifyError */
VERIFY_ERROR_NO_CLASS, /* NoClassDefFoundError */
VERIFY_ERROR_NO_METHOD, /* NoSuchMethodError */