From 7eef1e37e782bec0e97910f16972f8d57853b702 Mon Sep 17 00:00:00 2001 From: "JesusFreke@JesusFreke.com" Date: Tue, 12 Jan 2010 08:10:37 +0000 Subject: [PATCH] Add addition "FirstInstrucitonTest" method to the deodex_test1 baksmali test git-svn-id: https://smali.googlecode.com/svn/trunk@563 55b6fa8a-2a1e-11de-a435-ffa8d773f76a --- .../src/test/smali/deodex_test1/main.smali | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/baksmali/src/test/smali/deodex_test1/main.smali b/baksmali/src/test/smali/deodex_test1/main.smali index bc6ca320..22c18690 100644 --- a/baksmali/src/test/smali/deodex_test1/main.smali +++ b/baksmali/src/test/smali/deodex_test1/main.smali @@ -107,4 +107,27 @@ #and now back to our normal programming :here return-object v0 +.end method + +.method public static FirstInstructionTest(Lrandomclass;)V + .registers 1 + + :try_start + invoke-virtual/range {p0}, Lrandomclass;->getSuperclass()Lsuperclass; + return-void + :try_end + .catch Ljava/lang/Exception; {:try_start .. :try_end} :handler + :handler + :inner_try_start + #this tests that the parameter register types are correctly propagated to the exception handlers, in the + #case that the first instruction of the method can throw an exception and is in a try black + invoke-virtual/range {p0}, Lrandomclass;->getSuperclass()Lsuperclass; + return-void + :inner_try_end + .catch Ljava/lang/Exception; {:inner_try_start .. :inner_try_end} :inner_handler + :inner_handler + #this additionally tests that the register types are propagated recursively, in the case that the first + #instruction in the exception handler can also throw an exception, and is covered by a try block + invoke-virtual/range {p0}, Lrandomclass;->getSuperclass()Lsuperclass; + return-void .end method \ No newline at end of file