diff options
author | wisberg <wisberg> | 2002-12-16 17:58:19 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2002-12-16 17:58:19 +0000 |
commit | d842c4f1139629c1f062b74ba818d233b2c31043 (patch) | |
tree | 842d3871620bc0eb60edcd95e55804d67e0f61fa /weaver/testdata | |
parent | 3ce247199704eae6b2c92c6e38c69584e3250c52 (diff) | |
download | aspectj-d842c4f1139629c1f062b74ba818d233b2c31043.tar.gz aspectj-d842c4f1139629c1f062b74ba818d233b2c31043.zip |
initial version
Diffstat (limited to 'weaver/testdata')
65 files changed, 7326 insertions, 0 deletions
diff --git a/weaver/testdata/AddNotResidueDynamicHelloWorld.txt b/weaver/testdata/AddNotResidueDynamicHelloWorld.txt new file mode 100644 index 000000000..48a5bfd77 --- /dev/null +++ b/weaver/testdata/AddNotResidueDynamicHelloWorld.txt @@ -0,0 +1,82 @@ +public class DynamicHelloWorld extends java.lang.Object implements java.io.Serializable: + public void <init>(): + ALOAD_0 // DynamicHelloWorld this (line 8) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void DynamicHelloWorld.<init>()) + | RETURN + constructor-execution(void DynamicHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + | catch java.lang.UnsupportedOperationException -> E0 + | | NEW DynamicHelloWorld (line 12) + | | DUP + | | constructor-call(void DynamicHelloWorld.<init>()) + | | | INVOKESPECIAL DynamicHelloWorld.<init> ()V + | | constructor-call(void DynamicHelloWorld.<init>()) + | | LDC "hello" + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | | GETSTATIC java.util.Collections.EMPTY_LIST Ljava/util/List; + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | | INVOKEVIRTUAL DynamicHelloWorld.doit (Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | POP + | | GOTO L0 + | catch java.lang.UnsupportedOperationException -> E0 + | E0: ASTORE_1 (line 13) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 14) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | LDC "expected and caught: " + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ALOAD_1 // java.lang.UnsupportedOperationException t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 15) + | L0: NEW java.lang.RuntimeException (line 17) + | DUP + | LDC "should have caught exception" + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.RuntimeException.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | ATHROW + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + String doit(String, java.util.List): + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | ALOAD_2 // java.util.List l (line 21) + | ALOAD_1 // java.lang.String arg0 + | ASTORE_3 + | ASTORE 4 + | method-call(boolean java.util.List.add(java.lang.Object)) + | | ALOAD 4 + | | INSTANCEOF java.util.ArrayList + | | IFNE L0 + | | INVOKESTATIC Aspect.ajc_before_0 ()V + | | L0: ALOAD 4 + | | ALOAD_3 + | | INVOKEINTERFACE java.util.List.add (Ljava/lang/Object;)Z + | method-call(boolean java.util.List.add(java.lang.Object)) + | POP + | ALOAD_2 // java.util.List l (line 22) + | method-call(java.lang.String java.lang.Object.toString()) + | | INVOKEVIRTUAL java.lang.Object.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.Object.toString()) + | ARETURN + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + end String doit(String, java.util.List) +end public class DynamicHelloWorld diff --git a/weaver/testdata/AddResidueDynamicHelloWorld.txt b/weaver/testdata/AddResidueDynamicHelloWorld.txt new file mode 100644 index 000000000..16f438647 --- /dev/null +++ b/weaver/testdata/AddResidueDynamicHelloWorld.txt @@ -0,0 +1,82 @@ +public class DynamicHelloWorld extends java.lang.Object implements java.io.Serializable: + public void <init>(): + ALOAD_0 // DynamicHelloWorld this (line 8) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void DynamicHelloWorld.<init>()) + | RETURN + constructor-execution(void DynamicHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + | catch java.lang.UnsupportedOperationException -> E0 + | | NEW DynamicHelloWorld (line 12) + | | DUP + | | constructor-call(void DynamicHelloWorld.<init>()) + | | | INVOKESPECIAL DynamicHelloWorld.<init> ()V + | | constructor-call(void DynamicHelloWorld.<init>()) + | | LDC "hello" + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | | GETSTATIC java.util.Collections.EMPTY_LIST Ljava/util/List; + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | | INVOKEVIRTUAL DynamicHelloWorld.doit (Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | POP + | | GOTO L0 + | catch java.lang.UnsupportedOperationException -> E0 + | E0: ASTORE_1 (line 13) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 14) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | LDC "expected and caught: " + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ALOAD_1 // java.lang.UnsupportedOperationException t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 15) + | L0: NEW java.lang.RuntimeException (line 17) + | DUP + | LDC "should have caught exception" + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.RuntimeException.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | ATHROW + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + String doit(String, java.util.List): + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | ALOAD_2 // java.util.List l (line 21) + | ALOAD_1 // java.lang.String arg0 + | ASTORE_3 + | ASTORE 4 + | method-call(boolean java.util.List.add(java.lang.Object)) + | | ALOAD 4 + | | INSTANCEOF java.util.ArrayList + | | IFEQ L0 + | | INVOKESTATIC Aspect.ajc_before_0 ()V + | | L0: ALOAD 4 + | | ALOAD_3 + | | INVOKEINTERFACE java.util.List.add (Ljava/lang/Object;)Z + | method-call(boolean java.util.List.add(java.lang.Object)) + | POP + | ALOAD_2 // java.util.List l (line 22) + | method-call(java.lang.String java.lang.Object.toString()) + | | INVOKEVIRTUAL java.lang.Object.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.Object.toString()) + | ARETURN + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + end String doit(String, java.util.List) +end public class DynamicHelloWorld diff --git a/weaver/testdata/AddStateResidueDynamicHelloWorld.txt b/weaver/testdata/AddStateResidueDynamicHelloWorld.txt new file mode 100644 index 000000000..f0c96df34 --- /dev/null +++ b/weaver/testdata/AddStateResidueDynamicHelloWorld.txt @@ -0,0 +1,84 @@ +public class DynamicHelloWorld extends java.lang.Object implements java.io.Serializable: + public void <init>(): + ALOAD_0 // DynamicHelloWorld this (line 8) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void DynamicHelloWorld.<init>()) + | RETURN + constructor-execution(void DynamicHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + | catch java.lang.UnsupportedOperationException -> E0 + | | NEW DynamicHelloWorld (line 12) + | | DUP + | | constructor-call(void DynamicHelloWorld.<init>()) + | | | INVOKESPECIAL DynamicHelloWorld.<init> ()V + | | constructor-call(void DynamicHelloWorld.<init>()) + | | LDC "hello" + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | | GETSTATIC java.util.Collections.EMPTY_LIST Ljava/util/List; + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | | INVOKEVIRTUAL DynamicHelloWorld.doit (Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | POP + | | GOTO L0 + | catch java.lang.UnsupportedOperationException -> E0 + | E0: ASTORE_1 (line 13) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 14) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | LDC "expected and caught: " + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ALOAD_1 // java.lang.UnsupportedOperationException t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 15) + | L0: NEW java.lang.RuntimeException (line 17) + | DUP + | LDC "should have caught exception" + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.RuntimeException.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | ATHROW + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + String doit(String, java.util.List): + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | ALOAD_2 // java.util.List l (line 21) + | ALOAD_1 // java.lang.String arg0 + | ASTORE_3 + | ASTORE 4 + | method-call(boolean java.util.List.add(java.lang.Object)) + | | ALOAD 4 + | | INSTANCEOF java.util.ArrayList + | | IFEQ L0 + | | ALOAD 4 + | | CHECKCAST java.util.ArrayList + | | INVOKESTATIC Aspect.ajc_before_0 (Ljava/util/ArrayList;)V + | | L0: ALOAD 4 + | | ALOAD_3 + | | INVOKEINTERFACE java.util.List.add (Ljava/lang/Object;)Z + | method-call(boolean java.util.List.add(java.lang.Object)) + | POP + | ALOAD_2 // java.util.List l (line 22) + | method-call(java.lang.String java.lang.Object.toString()) + | | INVOKEVIRTUAL java.lang.Object.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.Object.toString()) + | ARETURN + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + end String doit(String, java.util.List) +end public class DynamicHelloWorld diff --git a/weaver/testdata/AfterFancyHelloWorld.txt b/weaver/testdata/AfterFancyHelloWorld.txt new file mode 100644 index 000000000..16b04e4b1 --- /dev/null +++ b/weaver/testdata/AfterFancyHelloWorld.txt @@ -0,0 +1,183 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | catch java.lang.Throwable -> E0 + | | GOTO L0 + | catch java.lang.Throwable -> E0 + | E0: ASTORE_1 + | INVOKESTATIC Aspect.ajc_after_constructor_execution ()V + | ALOAD_1 + | ATHROW + | L0: INVOKESTATIC Aspect.ajc_after_constructor_execution ()V + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | catch java.lang.Throwable -> E6 + | | field-get(java.io.PrintStream java.lang.System.out) + | | | catch java.lang.Throwable -> E3 + | | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | | | catch java.lang.Throwable -> E3 + | | | GOTO L0 + | | | E3: ASTORE 5 + | | | INVOKESTATIC Aspect.ajc_after_field_get ()V + | | | ALOAD 5 + | | | ATHROW + | | | L0: NOP + | | | INVOKESTATIC Aspect.ajc_after_field_get ()V + | | | NOP + | | field-get(java.io.PrintStream java.lang.System.out) + | | ASTORE_1 + | | finally -> E5 + | | | catch java.lang.Exception -> E4 + | | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | | LDC "bye" + | | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | | catch java.lang.Throwable -> E2 + | | | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | | | catch java.lang.Throwable -> E2 + | | | | | GOTO L1 + | | | | | E2: ASTORE 6 + | | | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | | | ALOAD 6 + | | | | | ATHROW + | | | | | L1: NOP + | | | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | | | NOP + | | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | GOTO L3 + | | | catch java.lang.Exception -> E4 + | | | E4: ASTORE_2 (line 12) + | | | ALOAD_1 // java.io.PrintStream out (line 13) + | | | ALOAD_2 // java.lang.Exception e + | | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | | catch java.lang.Throwable -> E1 + | | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | | | catch java.lang.Throwable -> E1 + | | | | GOTO L2 + | | | | E1: ASTORE 7 + | | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | | ALOAD 7 + | | | | ATHROW + | | | | L2: NOP + | | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | | NOP + | | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | finally -> E5 + | | GOTO L3 + | | E5: ASTORE 4 (line 14) + | | JSR L4 + | | ALOAD 4 + | | ATHROW + | | L3: JSR L4 + | | GOTO L6 + | | L4: ASTORE_3 + | | ALOAD_1 // java.io.PrintStream out (line 15) + | | LDC "finally" + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | catch java.lang.Throwable -> E0 + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | catch java.lang.Throwable -> E0 + | | | GOTO L5 + | | | E0: ASTORE 8 + | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | ALOAD 8 + | | | ATHROW + | | | L5: NOP + | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | NOP + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | RET 3 (line 10) + | | L6: GOTO L7 (line 17) + | catch java.lang.Throwable -> E6 + | E6: ASTORE 9 + | INVOKESTATIC Aspect.ajc_after_method_execution ()V + | ALOAD 9 + | ATHROW + | L7: INVOKESTATIC Aspect.ajc_after_method_execution ()V + | RETURN + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | catch java.lang.Throwable -> E4 + | | ICONST_0 (line 20) + | | ISTORE_0 + | | ILOAD_0 // int x (line 21) + | | LDC "name" + | | method-call(int java.lang.String.hashCode()) + | | | catch java.lang.Throwable -> E3 + | | | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | | | catch java.lang.Throwable -> E3 + | | | GOTO L0 + | | | E3: ASTORE_1 + | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | ALOAD_1 + | | | ATHROW + | | | L0: NOP + | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | NOP + | | method-call(int java.lang.String.hashCode()) + | | IADD + | | ISTORE_0 // int x + | | LDC "name" (line 22) + | | ASTORE_2 + | | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | | catch java.lang.Throwable -> E2 + | | | | NEW java.lang.StringBuffer + | | | | DUP + | | | | ALOAD_2 + | | | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | | | catch java.lang.Throwable -> E2 + | | | GOTO L1 + | | | E2: ASTORE_3 + | | | INVOKESTATIC Aspect.ajc_after_constructor_call ()V + | | | ALOAD_3 + | | | ATHROW + | | | L1: NOP + | | | INVOKESTATIC Aspect.ajc_after_constructor_call ()V + | | | NOP + | | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | ILOAD_0 // int x + | | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | | catch java.lang.Throwable -> E1 + | | | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | | | catch java.lang.Throwable -> E1 + | | | GOTO L2 + | | | E1: ASTORE 4 + | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | ALOAD 4 + | | | ATHROW + | | | L2: NOP + | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | NOP + | | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | | catch java.lang.Throwable -> E0 + | | | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | | | catch java.lang.Throwable -> E0 + | | | GOTO L3 + | | | E0: ASTORE 5 + | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | ALOAD 5 + | | | ATHROW + | | | L3: NOP + | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | NOP + | | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | GOTO L4 + | catch java.lang.Throwable -> E4 + | E4: ASTORE 6 + | INVOKESTATIC Aspect.ajc_after_method_execution ()V + | ALOAD 6 + | ATHROW + | L4: INVOKESTATIC Aspect.ajc_after_method_execution ()V + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/AfterHelloWorld.txt b/weaver/testdata/AfterHelloWorld.txt new file mode 100644 index 000000000..4c0e6db53 --- /dev/null +++ b/weaver/testdata/AfterHelloWorld.txt @@ -0,0 +1,58 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | catch java.lang.Throwable -> E0 + | | GOTO L0 + | catch java.lang.Throwable -> E0 + | E0: ASTORE_1 + | INVOKESTATIC Aspect.ajc_after_constructor_execution ()V + | ALOAD_1 + | ATHROW + | L0: INVOKESTATIC Aspect.ajc_after_constructor_execution ()V + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | catch java.lang.Throwable -> E2 + | | field-get(java.io.PrintStream java.lang.System.out) + | | | catch java.lang.Throwable -> E1 + | | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | | | catch java.lang.Throwable -> E1 + | | | GOTO L0 + | | | E1: ASTORE_1 + | | | INVOKESTATIC Aspect.ajc_after_field_get ()V + | | | ALOAD_1 + | | | ATHROW + | | | L0: NOP + | | | INVOKESTATIC Aspect.ajc_after_field_get ()V + | | | NOP + | | field-get(java.io.PrintStream java.lang.System.out) + | | LDC "hello world" (line 9) + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | catch java.lang.Throwable -> E0 + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | catch java.lang.Throwable -> E0 + | | | GOTO L1 + | | | E0: ASTORE_2 + | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | ALOAD_2 + | | | ATHROW + | | | L1: NOP + | | | INVOKESTATIC Aspect.ajc_after_method_call ()V + | | | NOP + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | GOTO L2 (line 11) + | catch java.lang.Throwable -> E2 + | E2: ASTORE_3 + | INVOKESTATIC Aspect.ajc_after_method_execution ()V + | ALOAD_3 + | ATHROW + | L2: INVOKESTATIC Aspect.ajc_after_method_execution ()V + | RETURN + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/AfterReturningCheckcastParamFancyHelloWorld.txt b/weaver/testdata/AfterReturningCheckcastParamFancyHelloWorld.txt new file mode 100644 index 000000000..868a63429 --- /dev/null +++ b/weaver/testdata/AfterReturningCheckcastParamFancyHelloWorld.txt @@ -0,0 +1,86 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | | DUP + | | ASTORE 5 + | | ALOAD 5 + | | INSTANCEOF java.rmi.server.LogStream + | | IFEQ L0 + | | ALOAD 5 + | | CHECKCAST java.rmi.server.LogStream + | | INVOKESTATIC Aspect.ajc_afterReturning_field_get (Ljava/rmi/server/LogStream;)V + | | L0: NOP + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L1 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L1 + | E1: ASTORE 4 (line 14) + | JSR L2 + | ALOAD 4 + | ATHROW + | L1: JSR L2 + | GOTO L3 + | L2: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L3: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/AfterReturningCheckcastParamHelloWorld.txt b/weaver/testdata/AfterReturningCheckcastParamHelloWorld.txt new file mode 100644 index 000000000..0aa498026 --- /dev/null +++ b/weaver/testdata/AfterReturningCheckcastParamHelloWorld.txt @@ -0,0 +1,31 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | | DUP + | | ASTORE_1 + | | ALOAD_1 + | | INSTANCEOF java.rmi.server.LogStream + | | IFEQ L0 + | | ALOAD_1 + | | CHECKCAST java.rmi.server.LogStream + | | INVOKESTATIC Aspect.ajc_afterReturning_field_get (Ljava/rmi/server/LogStream;)V + | | L0: NOP + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/AfterReturningConversionParam.txt b/weaver/testdata/AfterReturningConversionParam.txt new file mode 100644 index 000000000..7920b30d2 --- /dev/null +++ b/weaver/testdata/AfterReturningConversionParam.txt @@ -0,0 +1,83 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L0 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L0 + | E1: ASTORE 4 (line 14) + | JSR L1 + | ALOAD 4 + | ATHROW + | L0: JSR L1 + | GOTO L2 + | L1: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L2: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | | DUP + | | ISTORE_1 + | | ILOAD_1 + | | INVOKESTATIC org.aspectj.runtime.internal.Conversions.intObject (I)Ljava/lang/Object; + | | INVOKESTATIC Aspect.ajc_afterReturning_field_get (Ljava/lang/Object;)V + | | NOP + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/AfterReturningConversionParamFancyHelloWorld.txt b/weaver/testdata/AfterReturningConversionParamFancyHelloWorld.txt new file mode 100644 index 000000000..ab6c18583 --- /dev/null +++ b/weaver/testdata/AfterReturningConversionParamFancyHelloWorld.txt @@ -0,0 +1,88 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + local 0: FancyHelloWorld this + | ALOAD_0 + | INVOKESPECIAL java.lang.Object.<init> ()V + local 0: FancyHelloWorld this + RETURN + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | local 0: java.lang.String[] args + | | field-get(java.io.PrintStream java.lang.System.out) + | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; + | | field-get(java.io.PrintStream java.lang.System.out) + | | ASTORE_1 + | | local 1: java.io.PrintStream out + | | | finally -> E1 + | | | | catch java.lang.Exception -> E0 + | | | | | ALOAD_1 + | | | | | LDC "bye" + | | | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | | GOTO L0 + | | | | catch java.lang.Exception -> E0 + | | | | E0: ASTORE_2 + | | | | local 2: java.lang.Exception e + | | | | | ALOAD_1 + | | | | | ALOAD_2 + | | | | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | | | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | | local 2: java.lang.Exception e + | | | finally -> E1 + | | | GOTO L0 + | | | E1: ASTORE 4 + | | | JSR L1 + | | | ALOAD 4 + | | | ATHROW + | | | L0: JSR L1 + | | | GOTO L2 + | | | L1: ASTORE_3 + | | | ALOAD_1 + | | | LDC "finally" + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | RET 3 + | | local 1: java.io.PrintStream out + | local 0: java.lang.String[] args + | L2: RETURN + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 + | ISTORE_0 + | local 0: int x + | | ILOAD_0 + | | LDC "name" + | | method-call(int java.lang.String.hashCode()) + | | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | | | DUP + | | | ISTORE_1 + | | | ILOAD_1 + | | | INVOKESTATIC org.aspectj.runtime.internal.Conversions.intObject (I)Ljava/lang/Object; + | | | INVOKESTATIC Aspect.ajc_afterReturning_field_get (Ljava/lang/Object;)V + | | method-call(int java.lang.String.hashCode()) + | | IADD + | | ISTORE_0 + | | NEW java.lang.StringBuffer + | | DUP + | | LDC "name" + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | | ILOAD_0 + | | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | | method-call(java.lang.String java.lang.StringBuffer.toString()) + | local 0: int x + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/AfterReturningFancyHelloWorld.txt b/weaver/testdata/AfterReturningFancyHelloWorld.txt new file mode 100644 index 000000000..1bcdad132 --- /dev/null +++ b/weaver/testdata/AfterReturningFancyHelloWorld.txt @@ -0,0 +1,101 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | GOTO L0 + | L0: INVOKESTATIC Aspect.ajc_afterReturning_constructor_execution ()V + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | | INVOKESTATIC Aspect.ajc_afterReturning_field_get ()V + | | NOP + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | | INVOKESTATIC Aspect.ajc_afterReturning_method_call ()V + | | | | NOP + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L0 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | | INVOKESTATIC Aspect.ajc_afterReturning_method_call ()V + | | | NOP + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L0 + | E1: ASTORE 4 (line 14) + | JSR L1 + | ALOAD 4 + | ATHROW + | L0: JSR L1 + | GOTO L2 + | L1: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | INVOKESTATIC Aspect.ajc_afterReturning_method_call ()V + | | NOP + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L2: GOTO L3 (line 17) + | L3: INVOKESTATIC Aspect.ajc_afterReturning_method_execution ()V + | RETURN + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | | INVOKESTATIC Aspect.ajc_afterReturning_method_call ()V + | | NOP + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | LDC "name" (line 22) + | ASTORE_1 + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | NEW java.lang.StringBuffer + | | DUP + | | ALOAD_1 + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | | INVOKESTATIC Aspect.ajc_afterReturning_constructor_call ()V + | | NOP + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | | INVOKESTATIC Aspect.ajc_afterReturning_method_call ()V + | | NOP + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | | INVOKESTATIC Aspect.ajc_afterReturning_method_call ()V + | | NOP + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | GOTO L0 + | L0: INVOKESTATIC Aspect.ajc_afterReturning_method_execution ()V + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/AfterReturningHelloWorld.txt b/weaver/testdata/AfterReturningHelloWorld.txt new file mode 100644 index 000000000..271a34b38 --- /dev/null +++ b/weaver/testdata/AfterReturningHelloWorld.txt @@ -0,0 +1,30 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | GOTO L0 + | L0: INVOKESTATIC Aspect.ajc_afterReturning_constructor_execution ()V + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | | INVOKESTATIC Aspect.ajc_afterReturning_field_get ()V + | | NOP + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | INVOKESTATIC Aspect.ajc_afterReturning_method_call ()V + | | NOP + | method-call(void java.io.PrintStream.println(java.lang.String)) + | GOTO L0 (line 11) + | L0: INVOKESTATIC Aspect.ajc_afterReturning_method_execution ()V + | RETURN + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/AfterReturningParamFancyHelloWorld.txt b/weaver/testdata/AfterReturningParamFancyHelloWorld.txt new file mode 100644 index 000000000..959862843 --- /dev/null +++ b/weaver/testdata/AfterReturningParamFancyHelloWorld.txt @@ -0,0 +1,82 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | | DUP + | | ASTORE 5 + | | ALOAD 5 + | | INVOKESTATIC Aspect.ajc_afterReturning_field_get (Ljava/lang/Object;)V + | | NOP + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L0 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L0 + | E1: ASTORE 4 (line 14) + | JSR L1 + | ALOAD 4 + | ATHROW + | L0: JSR L1 + | GOTO L2 + | L1: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L2: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/AfterReturningParamHelloWorld.txt b/weaver/testdata/AfterReturningParamHelloWorld.txt new file mode 100644 index 000000000..6da75a8f8 --- /dev/null +++ b/weaver/testdata/AfterReturningParamHelloWorld.txt @@ -0,0 +1,27 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | | DUP + | | ASTORE_1 + | | ALOAD_1 + | | INVOKESTATIC Aspect.ajc_afterReturning_field_get (Ljava/lang/Object;)V + | | NOP + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/AfterThrowingFancyHelloWorld.txt b/weaver/testdata/AfterThrowingFancyHelloWorld.txt new file mode 100644 index 000000000..ed9e89bfd --- /dev/null +++ b/weaver/testdata/AfterThrowingFancyHelloWorld.txt @@ -0,0 +1,161 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | catch java.lang.Throwable -> E0 + | | RETURN + | catch java.lang.Throwable -> E0 + | E0: ASTORE_1 + | INVOKESTATIC Aspect.ajc_afterThrowing_constructor_execution ()V + | ALOAD_1 + | ATHROW + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | catch java.lang.Throwable -> E6 + | | field-get(java.io.PrintStream java.lang.System.out) + | | | catch java.lang.Throwable -> E3 + | | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | | | catch java.lang.Throwable -> E3 + | | | GOTO L0 + | | | E3: ASTORE 5 + | | | INVOKESTATIC Aspect.ajc_afterThrowing_field_get ()V + | | | ALOAD 5 + | | | ATHROW + | | | L0: NOP + | | field-get(java.io.PrintStream java.lang.System.out) + | | ASTORE_1 + | | finally -> E5 + | | | catch java.lang.Exception -> E4 + | | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | | LDC "bye" + | | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | | catch java.lang.Throwable -> E2 + | | | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | | | catch java.lang.Throwable -> E2 + | | | | | GOTO L1 + | | | | | E2: ASTORE 6 + | | | | | INVOKESTATIC Aspect.ajc_afterThrowing_method_call ()V + | | | | | ALOAD 6 + | | | | | ATHROW + | | | | | L1: NOP + | | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | GOTO L3 + | | | catch java.lang.Exception -> E4 + | | | E4: ASTORE_2 (line 12) + | | | ALOAD_1 // java.io.PrintStream out (line 13) + | | | ALOAD_2 // java.lang.Exception e + | | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | | catch java.lang.Throwable -> E1 + | | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | | | catch java.lang.Throwable -> E1 + | | | | GOTO L2 + | | | | E1: ASTORE 7 + | | | | INVOKESTATIC Aspect.ajc_afterThrowing_method_call ()V + | | | | ALOAD 7 + | | | | ATHROW + | | | | L2: NOP + | | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | finally -> E5 + | | GOTO L3 + | | E5: ASTORE 4 (line 14) + | | JSR L4 + | | ALOAD 4 + | | ATHROW + | | L3: JSR L4 + | | GOTO L6 + | | L4: ASTORE_3 + | | ALOAD_1 // java.io.PrintStream out (line 15) + | | LDC "finally" + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | catch java.lang.Throwable -> E0 + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | catch java.lang.Throwable -> E0 + | | | GOTO L5 + | | | E0: ASTORE 8 + | | | INVOKESTATIC Aspect.ajc_afterThrowing_method_call ()V + | | | ALOAD 8 + | | | ATHROW + | | | L5: NOP + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | RET 3 (line 10) + | | L6: RETURN (line 17) + | catch java.lang.Throwable -> E6 + | E6: ASTORE 9 + | INVOKESTATIC Aspect.ajc_afterThrowing_method_execution ()V + | ALOAD 9 + | ATHROW + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | catch java.lang.Throwable -> E4 + | | ICONST_0 (line 20) + | | ISTORE_0 + | | ILOAD_0 // int x (line 21) + | | LDC "name" + | | method-call(int java.lang.String.hashCode()) + | | | catch java.lang.Throwable -> E3 + | | | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | | | catch java.lang.Throwable -> E3 + | | | GOTO L0 + | | | E3: ASTORE_1 + | | | INVOKESTATIC Aspect.ajc_afterThrowing_method_call ()V + | | | ALOAD_1 + | | | ATHROW + | | | L0: NOP + | | method-call(int java.lang.String.hashCode()) + | | IADD + | | ISTORE_0 // int x + | | LDC "name" (line 22) + | | ASTORE_2 + | | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | | catch java.lang.Throwable -> E2 + | | | | NEW java.lang.StringBuffer + | | | | DUP + | | | | ALOAD_2 + | | | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | | | catch java.lang.Throwable -> E2 + | | | GOTO L1 + | | | E2: ASTORE_3 + | | | INVOKESTATIC Aspect.ajc_afterThrowing_constructor_call ()V + | | | ALOAD_3 + | | | ATHROW + | | | L1: NOP + | | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | ILOAD_0 // int x + | | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | | catch java.lang.Throwable -> E1 + | | | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | | | catch java.lang.Throwable -> E1 + | | | GOTO L2 + | | | E1: ASTORE 4 + | | | INVOKESTATIC Aspect.ajc_afterThrowing_method_call ()V + | | | ALOAD 4 + | | | ATHROW + | | | L2: NOP + | | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | | catch java.lang.Throwable -> E0 + | | | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | | | catch java.lang.Throwable -> E0 + | | | GOTO L3 + | | | E0: ASTORE 5 + | | | INVOKESTATIC Aspect.ajc_afterThrowing_method_call ()V + | | | ALOAD 5 + | | | ATHROW + | | | L3: NOP + | | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | ARETURN + | catch java.lang.Throwable -> E4 + | E4: ASTORE 6 + | INVOKESTATIC Aspect.ajc_afterThrowing_method_execution ()V + | ALOAD 6 + | ATHROW + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/AfterThrowingHelloWorld.txt b/weaver/testdata/AfterThrowingHelloWorld.txt new file mode 100644 index 000000000..6b307e761 --- /dev/null +++ b/weaver/testdata/AfterThrowingHelloWorld.txt @@ -0,0 +1,50 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | catch java.lang.Throwable -> E0 + | | RETURN + | catch java.lang.Throwable -> E0 + | E0: ASTORE_1 + | INVOKESTATIC Aspect.ajc_afterThrowing_constructor_execution ()V + | ALOAD_1 + | ATHROW + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | catch java.lang.Throwable -> E2 + | | field-get(java.io.PrintStream java.lang.System.out) + | | | catch java.lang.Throwable -> E1 + | | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | | | catch java.lang.Throwable -> E1 + | | | GOTO L0 + | | | E1: ASTORE_1 + | | | INVOKESTATIC Aspect.ajc_afterThrowing_field_get ()V + | | | ALOAD_1 + | | | ATHROW + | | | L0: NOP + | | field-get(java.io.PrintStream java.lang.System.out) + | | LDC "hello world" (line 9) + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | catch java.lang.Throwable -> E0 + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | catch java.lang.Throwable -> E0 + | | | GOTO L1 + | | | E0: ASTORE_2 + | | | INVOKESTATIC Aspect.ajc_afterThrowing_method_call ()V + | | | ALOAD_2 + | | | ATHROW + | | | L1: NOP + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | RETURN (line 11) + | catch java.lang.Throwable -> E2 + | E2: ASTORE_3 + | INVOKESTATIC Aspect.ajc_afterThrowing_method_execution ()V + | ALOAD_3 + | ATHROW + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/AfterThrowingParamFancyHelloWorld.txt b/weaver/testdata/AfterThrowingParamFancyHelloWorld.txt new file mode 100644 index 000000000..351d35649 --- /dev/null +++ b/weaver/testdata/AfterThrowingParamFancyHelloWorld.txt @@ -0,0 +1,86 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | catch java.lang.Throwable -> E0 + | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | | catch java.lang.Throwable -> E0 + | | GOTO L0 + | | E0: ASTORE 5 + | | ALOAD 5 + | | INVOKESTATIC Aspect.ajc_afterThrowing_field_get (Ljava/lang/Throwable;)V + | | ALOAD 5 + | | ATHROW + | | L0: NOP + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E2 + | | catch java.lang.Exception -> E1 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L1 + | | catch java.lang.Exception -> E1 + | | E1: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E2 + | GOTO L1 + | E2: ASTORE 4 (line 14) + | JSR L2 + | ALOAD 4 + | ATHROW + | L1: JSR L2 + | GOTO L3 + | L2: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L3: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/AfterThrowingParamHelloWorld.txt b/weaver/testdata/AfterThrowingParamHelloWorld.txt new file mode 100644 index 000000000..c94486d22 --- /dev/null +++ b/weaver/testdata/AfterThrowingParamHelloWorld.txt @@ -0,0 +1,31 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | catch java.lang.Throwable -> E0 + | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | | catch java.lang.Throwable -> E0 + | | GOTO L0 + | | E0: ASTORE_1 + | | ALOAD_1 + | | INVOKESTATIC Aspect.ajc_afterThrowing_field_get (Ljava/lang/Throwable;)V + | | ALOAD_1 + | | ATHROW + | | L0: NOP + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/ArgsAfterReturningFancyHelloWorld.txt b/weaver/testdata/ArgsAfterReturningFancyHelloWorld.txt new file mode 100644 index 000000000..1aa2a4f09 --- /dev/null +++ b/weaver/testdata/ArgsAfterReturningFancyHelloWorld.txt @@ -0,0 +1,108 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE 8 + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | ASTORE 5 + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | ALOAD 5 + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | | ALOAD 5 + | | | | INVOKESTATIC Aspect.ajc_afterReturning_method_call (Ljava/lang/Object;)V + | | | | NOP + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L0 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | ASTORE 6 + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | ALOAD 6 + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | | ALOAD 6 + | | | INVOKESTATIC Aspect.ajc_afterReturning_method_call (Ljava/lang/Object;)V + | | | NOP + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L0 + | E1: ASTORE 4 (line 14) + | JSR L1 + | ALOAD 4 + | ATHROW + | L0: JSR L1 + | GOTO L2 + | L1: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | ASTORE 7 + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | ALOAD 7 + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | ALOAD 7 + | | INVOKESTATIC Aspect.ajc_afterReturning_method_call (Ljava/lang/Object;)V + | | NOP + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L2: GOTO L3 (line 17) + | L3: ALOAD 8 + | INVOKESTATIC Aspect.ajc_afterReturning_method_execution (Ljava/lang/Object;)V + | RETURN + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | LDC "name" (line 22) + | ASTORE_1 + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | NEW java.lang.StringBuffer + | | DUP + | | ALOAD_1 + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | | ALOAD_1 + | | INVOKESTATIC Aspect.ajc_afterReturning_constructor_call (Ljava/lang/Object;)V + | | NOP + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | ISTORE_2 + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | ILOAD_2 + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | | ILOAD_2 + | | INVOKESTATIC org.aspectj.runtime.internal.Conversions.intObject (I)Ljava/lang/Object; + | | INVOKESTATIC Aspect.ajc_afterReturning_method_call (Ljava/lang/Object;)V + | | NOP + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/ArgsAfterReturningHelloWorld.txt b/weaver/testdata/ArgsAfterReturningHelloWorld.txt new file mode 100644 index 000000000..1b3c0e0e7 --- /dev/null +++ b/weaver/testdata/ArgsAfterReturningHelloWorld.txt @@ -0,0 +1,32 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE_2 + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | ASTORE_1 + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | ALOAD_1 + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | ALOAD_1 + | | INVOKESTATIC Aspect.ajc_afterReturning_method_call (Ljava/lang/Object;)V + | | NOP + | method-call(void java.io.PrintStream.println(java.lang.String)) + | GOTO L0 (line 11) + | L0: ALOAD_2 + | INVOKESTATIC Aspect.ajc_afterReturning_method_execution (Ljava/lang/Object;)V + | RETURN + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/ArgsAfterThrowingHelloWorld.txt b/weaver/testdata/ArgsAfterThrowingHelloWorld.txt new file mode 100644 index 000000000..e71e5a4f1 --- /dev/null +++ b/weaver/testdata/ArgsAfterThrowingHelloWorld.txt @@ -0,0 +1,42 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE_3 + method-execution(void HelloWorld.main(java.lang.String[])) + | catch java.lang.Throwable -> E1 + | | field-get(java.io.PrintStream java.lang.System.out) + | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | | field-get(java.io.PrintStream java.lang.System.out) + | | LDC "hello world" (line 9) + | | ASTORE_1 + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | catch java.lang.Throwable -> E0 + | | | | ALOAD_1 + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | catch java.lang.Throwable -> E0 + | | | GOTO L0 + | | | E0: ASTORE_2 + | | | ALOAD_1 + | | | INVOKESTATIC Aspect.ajc_afterThrowing_method_call (Ljava/lang/Object;)V + | | | ALOAD_2 + | | | ATHROW + | | | L0: NOP + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | RETURN (line 11) + | catch java.lang.Throwable -> E1 + | E1: ASTORE 4 + | ALOAD_3 + | INVOKESTATIC Aspect.ajc_afterThrowing_method_execution (Ljava/lang/Object;)V + | ALOAD 4 + | ATHROW + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/ArgsBeforeAfterHelloWorld.txt b/weaver/testdata/ArgsBeforeAfterHelloWorld.txt new file mode 100644 index 000000000..cddac2323 --- /dev/null +++ b/weaver/testdata/ArgsBeforeAfterHelloWorld.txt @@ -0,0 +1,52 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE_3 + method-execution(void HelloWorld.main(java.lang.String[])) + | catch java.lang.Throwable -> E1 + | | ALOAD_3 + | | INVOKESTATIC Aspect.ajc_before_method_execution (Ljava/lang/Object;)V + | | field-get(java.io.PrintStream java.lang.System.out) + | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | | field-get(java.io.PrintStream java.lang.System.out) + | | LDC "hello world" (line 9) + | | ASTORE_1 + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | catch java.lang.Throwable -> E0 + | | | | ALOAD_1 + | | | | INVOKESTATIC Aspect.ajc_before_method_call (Ljava/lang/Object;)V + | | | | ALOAD_1 + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | catch java.lang.Throwable -> E0 + | | | GOTO L0 + | | | E0: ASTORE_2 + | | | ALOAD_1 + | | | INVOKESTATIC Aspect.ajc_afterThrowing_method_call (Ljava/lang/Object;)V + | | | ALOAD_2 + | | | ATHROW + | | | L0: NOP + | | | ALOAD_1 + | | | INVOKESTATIC Aspect.ajc_afterReturning_method_call (Ljava/lang/Object;)V + | | | NOP + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | GOTO L1 (line 11) + | catch java.lang.Throwable -> E1 + | E1: ASTORE 4 + | ALOAD_3 + | INVOKESTATIC Aspect.ajc_afterThrowing_method_execution (Ljava/lang/Object;)V + | ALOAD 4 + | ATHROW + | L1: ALOAD_3 + | INVOKESTATIC Aspect.ajc_afterReturning_method_execution (Ljava/lang/Object;)V + | RETURN + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/AroundAllAndOthersFancyHelloWorld.txt b/weaver/testdata/AroundAllAndOthersFancyHelloWorld.txt new file mode 100644 index 000000000..fd5984ed4 --- /dev/null +++ b/weaver/testdata/AroundAllAndOthersFancyHelloWorld.txt @@ -0,0 +1,1003 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | INVOKESTATIC Aspect.ajc_before_constructor_execution ()V + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE_2 + | ALOAD_2 + | BIPUSH 0 + | ALOAD_0 + | AASTORE + | NEW FancyHelloWorld$AjcClosure3 + | DUP + | ALOAD_2 + | INVOKESPECIAL FancyHelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE 19 + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 21 + | ALOAD 21 + | BIPUSH 0 + | ALOAD 19 + | AASTORE + | NEW FancyHelloWorld$AjcClosure23 + | DUP + | ALOAD 21 + | INVOKESPECIAL FancyHelloWorld$AjcClosure23.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + | RETURN + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | BIPUSH 0 + | ANEWARRAY java.lang.Object + | ASTORE 15 + | NEW FancyHelloWorld$AjcClosure43 + | DUP + | ALOAD 15 + | INVOKESPECIAL FancyHelloWorld$AjcClosure43.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.lang.String + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() + + static final void init$_aroundBody0(FancyHelloWorld): + RETURN (line 7) + end static final void init$_aroundBody0(FancyHelloWorld) + + static final void init$_aroundBody2(FancyHelloWorld): + INVOKESTATIC Aspect.ajc_before_constructor_execution ()V + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE_1 + ALOAD_1 + BIPUSH 0 + ALOAD_0 + AASTORE + NEW FancyHelloWorld$AjcClosure1 + DUP + ALOAD_1 + INVOKESPECIAL FancyHelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void init$_aroundBody2(FancyHelloWorld) + + static final java.io.PrintStream out_aroundBody4(): + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + ARETURN + end static final java.io.PrintStream out_aroundBody4() + + static final java.io.PrintStream out_aroundBody6(): + INVOKESTATIC Aspect.ajc_before_field_get ()V + BIPUSH 0 + ANEWARRAY java.lang.Object + ASTORE_0 + NEW FancyHelloWorld$AjcClosure5 + DUP + ALOAD_0 + INVOKESPECIAL FancyHelloWorld$AjcClosure5.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + CHECKCAST java.io.PrintStream + ARETURN + end static final java.io.PrintStream out_aroundBody6() + + static final void println_aroundBody8(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 11) + RETURN + end static final void println_aroundBody8(java.io.PrintStream, String) + + static final void println_aroundBody10(java.io.PrintStream, String): + INVOKESTATIC Aspect.ajc_before_method_call ()V + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ALOAD_1 + AASTORE + NEW FancyHelloWorld$AjcClosure9 + DUP + ALOAD_2 + INVOKESPECIAL FancyHelloWorld$AjcClosure9.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void println_aroundBody10(java.io.PrintStream, String) + + static final void println_aroundBody12(java.io.PrintStream, Object): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V (line 13) + RETURN + end static final void println_aroundBody12(java.io.PrintStream, Object) + + static final void println_aroundBody14(java.io.PrintStream, Object): + INVOKESTATIC Aspect.ajc_before_method_call ()V + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ALOAD_1 + AASTORE + NEW FancyHelloWorld$AjcClosure13 + DUP + ALOAD_2 + INVOKESPECIAL FancyHelloWorld$AjcClosure13.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void println_aroundBody14(java.io.PrintStream, Object) + + static final void println_aroundBody16(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 15) + RETURN + end static final void println_aroundBody16(java.io.PrintStream, String) + + static final void println_aroundBody18(java.io.PrintStream, String): + INVOKESTATIC Aspect.ajc_before_method_call ()V + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ALOAD_1 + AASTORE + NEW FancyHelloWorld$AjcClosure17 + DUP + ALOAD_2 + INVOKESPECIAL FancyHelloWorld$AjcClosure17.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void println_aroundBody18(java.io.PrintStream, String) + + static final void main_aroundBody20(String[]): + field-get(java.io.PrintStream java.lang.System.out) + | INVOKESTATIC Aspect.ajc_before_field_get ()V + | BIPUSH 0 + | ANEWARRAY java.lang.Object + | ASTORE_1 + | NEW FancyHelloWorld$AjcClosure7 + | DUP + | ALOAD_1 + | INVOKESPECIAL FancyHelloWorld$AjcClosure7.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.io.PrintStream + field-get(java.io.PrintStream java.lang.System.out) + ASTORE_3 (line 9) + finally -> E1 + | catch java.lang.Exception -> E0 + | | ALOAD_3 (line 11) + | | LDC "bye" + | | ASTORE 5 + | | ASTORE 7 + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | | BIPUSH 2 + | | | ANEWARRAY java.lang.Object + | | | ASTORE 9 + | | | ALOAD 9 + | | | BIPUSH 0 + | | | ALOAD 7 + | | | AASTORE + | | | ALOAD 9 + | | | BIPUSH 1 + | | | ALOAD 5 + | | | AASTORE + | | | NEW FancyHelloWorld$AjcClosure11 + | | | DUP + | | | ALOAD 9 + | | | INVOKESPECIAL FancyHelloWorld$AjcClosure11.<init> ([Ljava/lang/Object;)V + | | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | | POP + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | GOTO L0 + | catch java.lang.Exception -> E0 + | E0: ASTORE 11 (line 12) + | ALOAD_3 (line 13) + | ALOAD 11 + | ASTORE 13 + | ASTORE 15 + | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | BIPUSH 2 + | | ANEWARRAY java.lang.Object + | | ASTORE 17 + | | ALOAD 17 + | | BIPUSH 0 + | | ALOAD 15 + | | AASTORE + | | ALOAD 17 + | | BIPUSH 1 + | | ALOAD 13 + | | AASTORE + | | NEW FancyHelloWorld$AjcClosure15 + | | DUP + | | ALOAD 17 + | | INVOKESPECIAL FancyHelloWorld$AjcClosure15.<init> ([Ljava/lang/Object;)V + | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | POP + | method-call(void java.io.PrintStream.println(java.lang.Object)) + finally -> E1 + GOTO L0 + E1: ASTORE 19 (line 14) + JSR L1 + ALOAD 19 + ATHROW + L0: JSR L1 + GOTO L2 + L1: ASTORE 21 + ALOAD_3 (line 15) + LDC "finally" + ASTORE 23 + ASTORE 25 + method-call(void java.io.PrintStream.println(java.lang.String)) + | INVOKESTATIC Aspect.ajc_before_method_call ()V + | BIPUSH 2 + | ANEWARRAY java.lang.Object + | ASTORE 27 + | ALOAD 27 + | BIPUSH 0 + | ALOAD 25 + | AASTORE + | ALOAD 27 + | BIPUSH 1 + | ALOAD 23 + | AASTORE + | NEW FancyHelloWorld$AjcClosure19 + | DUP + | ALOAD 27 + | INVOKESPECIAL FancyHelloWorld$AjcClosure19.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + method-call(void java.io.PrintStream.println(java.lang.String)) + RET 21 (line 10) + L2: RETURN (line 17) + end static final void main_aroundBody20(String[]) + + static final void main_aroundBody22(String[]): + INVOKESTATIC Aspect.ajc_before_method_execution ()V + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE_1 + ALOAD_1 + BIPUSH 0 + ALOAD_0 + AASTORE + NEW FancyHelloWorld$AjcClosure21 + DUP + ALOAD_1 + INVOKESPECIAL FancyHelloWorld$AjcClosure21.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void main_aroundBody22(String[]) + + static final int hashCode_aroundBody24(String): + ALOAD_0 + INVOKEVIRTUAL java.lang.String.hashCode ()I (line 21) + IRETURN + end static final int hashCode_aroundBody24(String) + + static final int hashCode_aroundBody26(String): + INVOKESTATIC Aspect.ajc_before_method_call ()V + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE_1 + ALOAD_1 + BIPUSH 0 + ALOAD_0 + AASTORE + NEW FancyHelloWorld$AjcClosure25 + DUP + ALOAD_1 + INVOKESPECIAL FancyHelloWorld$AjcClosure25.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + INVOKESTATIC org.aspectj.runtime.internal.Conversions.intValue (Ljava/lang/Object;)I + IRETURN + end static final int hashCode_aroundBody26(String) + + static final StringBuffer init$_aroundBody28(String): + NEW java.lang.StringBuffer + DUP + ALOAD_0 + INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V (line 22) + ARETURN + end static final StringBuffer init$_aroundBody28(String) + + static final StringBuffer init$_aroundBody30(String): + INVOKESTATIC Aspect.ajc_before_constructor_call ()V + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE_1 + ALOAD_1 + BIPUSH 0 + ALOAD_0 + AASTORE + NEW FancyHelloWorld$AjcClosure29 + DUP + ALOAD_1 + INVOKESPECIAL FancyHelloWorld$AjcClosure29.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + CHECKCAST java.lang.StringBuffer + ARETURN + end static final StringBuffer init$_aroundBody30(String) + + static final StringBuffer append_aroundBody32(StringBuffer, int): + ALOAD_0 + ILOAD_1 + INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; (line 22) + ARETURN + end static final StringBuffer append_aroundBody32(StringBuffer, int) + + static final StringBuffer append_aroundBody34(StringBuffer, int): + INVOKESTATIC Aspect.ajc_before_method_call ()V + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ILOAD_1 + INVOKESTATIC org.aspectj.runtime.internal.Conversions.intObject (I)Ljava/lang/Object; + AASTORE + NEW FancyHelloWorld$AjcClosure33 + DUP + ALOAD_2 + INVOKESPECIAL FancyHelloWorld$AjcClosure33.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + CHECKCAST java.lang.StringBuffer + ARETURN + end static final StringBuffer append_aroundBody34(StringBuffer, int) + + static final String toString_aroundBody36(StringBuffer): + ALOAD_0 + INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; (line 22) + ARETURN + end static final String toString_aroundBody36(StringBuffer) + + static final String toString_aroundBody38(StringBuffer): + INVOKESTATIC Aspect.ajc_before_method_call ()V + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE_1 + ALOAD_1 + BIPUSH 0 + ALOAD_0 + AASTORE + NEW FancyHelloWorld$AjcClosure37 + DUP + ALOAD_1 + INVOKESPECIAL FancyHelloWorld$AjcClosure37.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + CHECKCAST java.lang.String + ARETURN + end static final String toString_aroundBody38(StringBuffer) + + static final String getName_aroundBody40(): + ICONST_0 (line 20) + ISTORE_0 + ILOAD_0 (line 21) + LDC "name" + ASTORE_2 + method-call(int java.lang.String.hashCode()) + | INVOKESTATIC Aspect.ajc_before_method_call ()V + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 4 + | ALOAD 4 + | BIPUSH 0 + | ALOAD_2 + | AASTORE + | NEW FancyHelloWorld$AjcClosure27 + | DUP + | ALOAD 4 + | INVOKESPECIAL FancyHelloWorld$AjcClosure27.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | INVOKESTATIC org.aspectj.runtime.internal.Conversions.intValue (Ljava/lang/Object;)I + method-call(int java.lang.String.hashCode()) + IADD + ISTORE_0 + LDC "name" (line 22) + ASTORE 6 + constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | INVOKESTATIC Aspect.ajc_before_constructor_call ()V + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 8 + | ALOAD 8 + | BIPUSH 0 + | ALOAD 6 + | AASTORE + | NEW FancyHelloWorld$AjcClosure31 + | DUP + | ALOAD 8 + | INVOKESPECIAL FancyHelloWorld$AjcClosure31.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.lang.StringBuffer + constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + ILOAD_0 + ISTORE 10 + ASTORE 12 + method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | INVOKESTATIC Aspect.ajc_before_method_call ()V + | BIPUSH 2 + | ANEWARRAY java.lang.Object + | ASTORE 14 + | ALOAD 14 + | BIPUSH 0 + | ALOAD 12 + | AASTORE + | ALOAD 14 + | BIPUSH 1 + | ILOAD 10 + | INVOKESTATIC org.aspectj.runtime.internal.Conversions.intObject (I)Ljava/lang/Object; + | AASTORE + | NEW FancyHelloWorld$AjcClosure35 + | DUP + | ALOAD 14 + | INVOKESPECIAL FancyHelloWorld$AjcClosure35.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.lang.StringBuffer + method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + ASTORE 16 + method-call(java.lang.String java.lang.StringBuffer.toString()) + | INVOKESTATIC Aspect.ajc_before_method_call ()V + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 18 + | ALOAD 18 + | BIPUSH 0 + | ALOAD 16 + | AASTORE + | NEW FancyHelloWorld$AjcClosure39 + | DUP + | ALOAD 18 + | INVOKESPECIAL FancyHelloWorld$AjcClosure39.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.lang.String + method-call(java.lang.String java.lang.StringBuffer.toString()) + ARETURN + end static final String getName_aroundBody40() + + static final String getName_aroundBody42(): + INVOKESTATIC Aspect.ajc_before_method_execution ()V + BIPUSH 0 + ANEWARRAY java.lang.Object + ASTORE_0 + NEW FancyHelloWorld$AjcClosure41 + DUP + ALOAD_0 + INVOKESPECIAL FancyHelloWorld$AjcClosure41.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + CHECKCAST java.lang.String + ARETURN + end static final String getName_aroundBody42() +end public abstract class FancyHelloWorld + +public class FancyHelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST FancyHelloWorld + INVOKESTATIC FancyHelloWorld.init$_aroundBody0 (LFancyHelloWorld;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure1 + +public class FancyHelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST FancyHelloWorld + INVOKESTATIC FancyHelloWorld.init$_aroundBody2 (LFancyHelloWorld;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure3 + +public class FancyHelloWorld$AjcClosure5 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + INVOKESTATIC FancyHelloWorld.out_aroundBody4 ()Ljava/io/PrintStream; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure5 + +public class FancyHelloWorld$AjcClosure7 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + INVOKESTATIC FancyHelloWorld.out_aroundBody6 ()Ljava/io/PrintStream; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure7 + +public class FancyHelloWorld$AjcClosure9 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody8 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure9 + +public class FancyHelloWorld$AjcClosure11 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody10 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure11 + +public class FancyHelloWorld$AjcClosure13 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + INVOKESTATIC FancyHelloWorld.println_aroundBody12 (Ljava/io/PrintStream;Ljava/lang/Object;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure13 + +public class FancyHelloWorld$AjcClosure15 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + INVOKESTATIC FancyHelloWorld.println_aroundBody14 (Ljava/io/PrintStream;Ljava/lang/Object;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure15 + +public class FancyHelloWorld$AjcClosure17 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody16 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure17 + +public class FancyHelloWorld$AjcClosure19 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody18 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure19 + +public class FancyHelloWorld$AjcClosure21 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST [Ljava.lang.String; + INVOKESTATIC FancyHelloWorld.main_aroundBody20 ([Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure21 + +public class FancyHelloWorld$AjcClosure23 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST [Ljava.lang.String; + INVOKESTATIC FancyHelloWorld.main_aroundBody22 ([Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure23 + +public class FancyHelloWorld$AjcClosure25 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.hashCode_aroundBody24 (Ljava/lang/String;)I + INVOKESTATIC org.aspectj.runtime.internal.Conversions.intObject (I)Ljava/lang/Object; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure25 + +public class FancyHelloWorld$AjcClosure27 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.hashCode_aroundBody26 (Ljava/lang/String;)I + INVOKESTATIC org.aspectj.runtime.internal.Conversions.intObject (I)Ljava/lang/Object; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure27 + +public class FancyHelloWorld$AjcClosure29 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.init$_aroundBody28 (Ljava/lang/String;)Ljava/lang/StringBuffer; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure29 + +public class FancyHelloWorld$AjcClosure31 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.init$_aroundBody30 (Ljava/lang/String;)Ljava/lang/StringBuffer; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure31 + +public class FancyHelloWorld$AjcClosure33 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.StringBuffer + ALOAD_2 + BIPUSH 1 + AALOAD + INVOKESTATIC org.aspectj.runtime.internal.Conversions.intValue (Ljava/lang/Object;)I + INVOKESTATIC FancyHelloWorld.append_aroundBody32 (Ljava/lang/StringBuffer;I)Ljava/lang/StringBuffer; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure33 + +public class FancyHelloWorld$AjcClosure35 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.StringBuffer + ALOAD_2 + BIPUSH 1 + AALOAD + INVOKESTATIC org.aspectj.runtime.internal.Conversions.intValue (Ljava/lang/Object;)I + INVOKESTATIC FancyHelloWorld.append_aroundBody34 (Ljava/lang/StringBuffer;I)Ljava/lang/StringBuffer; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure35 + +public class FancyHelloWorld$AjcClosure37 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.StringBuffer + INVOKESTATIC FancyHelloWorld.toString_aroundBody36 (Ljava/lang/StringBuffer;)Ljava/lang/String; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure37 + +public class FancyHelloWorld$AjcClosure39 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.StringBuffer + INVOKESTATIC FancyHelloWorld.toString_aroundBody38 (Ljava/lang/StringBuffer;)Ljava/lang/String; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure39 + +public class FancyHelloWorld$AjcClosure41 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + INVOKESTATIC FancyHelloWorld.getName_aroundBody40 ()Ljava/lang/String; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure41 + +public class FancyHelloWorld$AjcClosure43 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + INVOKESTATIC FancyHelloWorld.getName_aroundBody42 ()Ljava/lang/String; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure43 diff --git a/weaver/testdata/AroundAllAndOthersHelloWorld.txt b/weaver/testdata/AroundAllAndOthersHelloWorld.txt new file mode 100644 index 000000000..2175e03c6 --- /dev/null +++ b/weaver/testdata/AroundAllAndOthersHelloWorld.txt @@ -0,0 +1,346 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | INVOKESTATIC Aspect.ajc_before_constructor_execution ()V + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE_2 + | ALOAD_2 + | BIPUSH 0 + | ALOAD_0 + | AASTORE + | NEW HelloWorld$AjcClosure3 + | DUP + | ALOAD_2 + | INVOKESPECIAL HelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE 7 + method-execution(void HelloWorld.main(java.lang.String[])) + | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 9 + | ALOAD 9 + | BIPUSH 0 + | ALOAD 7 + | AASTORE + | NEW HelloWorld$AjcClosure15 + | DUP + | ALOAD 9 + | INVOKESPECIAL HelloWorld$AjcClosure15.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + | RETURN + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static final void init$_aroundBody0(HelloWorld): + RETURN (line 5) + end static final void init$_aroundBody0(HelloWorld) + + static final void init$_aroundBody2(HelloWorld): + INVOKESTATIC Aspect.ajc_before_constructor_execution ()V + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE_1 + ALOAD_1 + BIPUSH 0 + ALOAD_0 + AASTORE + NEW HelloWorld$AjcClosure1 + DUP + ALOAD_1 + INVOKESPECIAL HelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void init$_aroundBody2(HelloWorld) + + static final java.io.PrintStream out_aroundBody4(): + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + ARETURN + end static final java.io.PrintStream out_aroundBody4() + + static final java.io.PrintStream out_aroundBody6(): + INVOKESTATIC Aspect.ajc_before_field_get ()V + BIPUSH 0 + ANEWARRAY java.lang.Object + ASTORE_0 + NEW HelloWorld$AjcClosure5 + DUP + ALOAD_0 + INVOKESPECIAL HelloWorld$AjcClosure5.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + CHECKCAST java.io.PrintStream + ARETURN + end static final java.io.PrintStream out_aroundBody6() + + static final void println_aroundBody8(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 9) + RETURN + end static final void println_aroundBody8(java.io.PrintStream, String) + + static final void println_aroundBody10(java.io.PrintStream, String): + INVOKESTATIC Aspect.ajc_before_method_call ()V + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ALOAD_1 + AASTORE + NEW HelloWorld$AjcClosure9 + DUP + ALOAD_2 + INVOKESPECIAL HelloWorld$AjcClosure9.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void println_aroundBody10(java.io.PrintStream, String) + + static final void main_aroundBody12(String[]): + field-get(java.io.PrintStream java.lang.System.out) + | INVOKESTATIC Aspect.ajc_before_field_get ()V + | BIPUSH 0 + | ANEWARRAY java.lang.Object + | ASTORE_1 + | NEW HelloWorld$AjcClosure7 + | DUP + | ALOAD_1 + | INVOKESPECIAL HelloWorld$AjcClosure7.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.io.PrintStream + field-get(java.io.PrintStream java.lang.System.out) + LDC "hello world" (line 9) + ASTORE_3 + ASTORE 5 + method-call(void java.io.PrintStream.println(java.lang.String)) + | INVOKESTATIC Aspect.ajc_before_method_call ()V + | BIPUSH 2 + | ANEWARRAY java.lang.Object + | ASTORE 7 + | ALOAD 7 + | BIPUSH 0 + | ALOAD 5 + | AASTORE + | ALOAD 7 + | BIPUSH 1 + | ALOAD_3 + | AASTORE + | NEW HelloWorld$AjcClosure11 + | DUP + | ALOAD 7 + | INVOKESPECIAL HelloWorld$AjcClosure11.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + method-call(void java.io.PrintStream.println(java.lang.String)) + RETURN (line 11) + end static final void main_aroundBody12(String[]) + + static final void main_aroundBody14(String[]): + INVOKESTATIC Aspect.ajc_before_method_execution ()V + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE_1 + ALOAD_1 + BIPUSH 0 + ALOAD_0 + AASTORE + NEW HelloWorld$AjcClosure13 + DUP + ALOAD_1 + INVOKESPECIAL HelloWorld$AjcClosure13.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void main_aroundBody14(String[]) +end public class HelloWorld + +public class HelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST HelloWorld + INVOKESTATIC HelloWorld.init$_aroundBody0 (LHelloWorld;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure1 + +public class HelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST HelloWorld + INVOKESTATIC HelloWorld.init$_aroundBody2 (LHelloWorld;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure3 + +public class HelloWorld$AjcClosure5 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + INVOKESTATIC HelloWorld.out_aroundBody4 ()Ljava/io/PrintStream; + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure5 + +public class HelloWorld$AjcClosure7 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + INVOKESTATIC HelloWorld.out_aroundBody6 ()Ljava/io/PrintStream; + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure7 + +public class HelloWorld$AjcClosure9 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC HelloWorld.println_aroundBody8 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure9 + +public class HelloWorld$AjcClosure11 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC HelloWorld.println_aroundBody10 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure11 + +public class HelloWorld$AjcClosure13 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST [Ljava.lang.String; + INVOKESTATIC HelloWorld.main_aroundBody12 ([Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure13 + +public class HelloWorld$AjcClosure15 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST [Ljava.lang.String; + INVOKESTATIC HelloWorld.main_aroundBody14 ([Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure15 diff --git a/weaver/testdata/AroundAllFancyHelloWorld.txt b/weaver/testdata/AroundAllFancyHelloWorld.txt new file mode 100644 index 000000000..ab5412705 --- /dev/null +++ b/weaver/testdata/AroundAllFancyHelloWorld.txt @@ -0,0 +1,541 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE_1 + | ALOAD_1 + | BIPUSH 0 + | ALOAD_0 + | AASTORE + | NEW FancyHelloWorld$AjcClosure1 + | DUP + | ALOAD_1 + | INVOKESPECIAL FancyHelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE 15 + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 16 + | ALOAD 16 + | BIPUSH 0 + | ALOAD 15 + | AASTORE + | NEW FancyHelloWorld$AjcClosure11 + | DUP + | ALOAD 16 + | INVOKESPECIAL FancyHelloWorld$AjcClosure11.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + | RETURN + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | BIPUSH 0 + | ANEWARRAY java.lang.Object + | ASTORE 10 + | NEW FancyHelloWorld$AjcClosure21 + | DUP + | ALOAD 10 + | INVOKESPECIAL FancyHelloWorld$AjcClosure21.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.lang.String + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() + + static final void init$_aroundBody0(FancyHelloWorld): + RETURN (line 7) + end static final void init$_aroundBody0(FancyHelloWorld) + + static final java.io.PrintStream out_aroundBody2(): + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + ARETURN + end static final java.io.PrintStream out_aroundBody2() + + static final void println_aroundBody4(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 11) + RETURN + end static final void println_aroundBody4(java.io.PrintStream, String) + + static final void println_aroundBody6(java.io.PrintStream, Object): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V (line 13) + RETURN + end static final void println_aroundBody6(java.io.PrintStream, Object) + + static final void println_aroundBody8(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 15) + RETURN + end static final void println_aroundBody8(java.io.PrintStream, String) + + static final void main_aroundBody10(String[]): + field-get(java.io.PrintStream java.lang.System.out) + | BIPUSH 0 + | ANEWARRAY java.lang.Object + | ASTORE_1 + | NEW FancyHelloWorld$AjcClosure3 + | DUP + | ALOAD_1 + | INVOKESPECIAL FancyHelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.io.PrintStream + field-get(java.io.PrintStream java.lang.System.out) + ASTORE_3 (line 9) + finally -> E1 + | catch java.lang.Exception -> E0 + | | ALOAD_3 (line 11) + | | LDC "bye" + | | ASTORE 5 + | | ASTORE 7 + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | BIPUSH 2 + | | | ANEWARRAY java.lang.Object + | | | ASTORE 9 + | | | ALOAD 9 + | | | BIPUSH 0 + | | | ALOAD 7 + | | | AASTORE + | | | ALOAD 9 + | | | BIPUSH 1 + | | | ALOAD 5 + | | | AASTORE + | | | NEW FancyHelloWorld$AjcClosure5 + | | | DUP + | | | ALOAD 9 + | | | INVOKESPECIAL FancyHelloWorld$AjcClosure5.<init> ([Ljava/lang/Object;)V + | | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | | POP + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | GOTO L0 + | catch java.lang.Exception -> E0 + | E0: ASTORE 11 (line 12) + | ALOAD_3 (line 13) + | ALOAD 11 + | ASTORE 13 + | ASTORE 15 + | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | BIPUSH 2 + | | ANEWARRAY java.lang.Object + | | ASTORE 17 + | | ALOAD 17 + | | BIPUSH 0 + | | ALOAD 15 + | | AASTORE + | | ALOAD 17 + | | BIPUSH 1 + | | ALOAD 13 + | | AASTORE + | | NEW FancyHelloWorld$AjcClosure7 + | | DUP + | | ALOAD 17 + | | INVOKESPECIAL FancyHelloWorld$AjcClosure7.<init> ([Ljava/lang/Object;)V + | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | POP + | method-call(void java.io.PrintStream.println(java.lang.Object)) + finally -> E1 + GOTO L0 + E1: ASTORE 19 (line 14) + JSR L1 + ALOAD 19 + ATHROW + L0: JSR L1 + GOTO L2 + L1: ASTORE 21 + ALOAD_3 (line 15) + LDC "finally" + ASTORE 23 + ASTORE 25 + method-call(void java.io.PrintStream.println(java.lang.String)) + | BIPUSH 2 + | ANEWARRAY java.lang.Object + | ASTORE 27 + | ALOAD 27 + | BIPUSH 0 + | ALOAD 25 + | AASTORE + | ALOAD 27 + | BIPUSH 1 + | ALOAD 23 + | AASTORE + | NEW FancyHelloWorld$AjcClosure9 + | DUP + | ALOAD 27 + | INVOKESPECIAL FancyHelloWorld$AjcClosure9.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + method-call(void java.io.PrintStream.println(java.lang.String)) + RET 21 (line 10) + L2: RETURN (line 17) + end static final void main_aroundBody10(String[]) + + static final int hashCode_aroundBody12(String): + ALOAD_0 + INVOKEVIRTUAL java.lang.String.hashCode ()I (line 21) + IRETURN + end static final int hashCode_aroundBody12(String) + + static final StringBuffer init$_aroundBody14(String): + NEW java.lang.StringBuffer + DUP + ALOAD_0 + INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V (line 22) + ARETURN + end static final StringBuffer init$_aroundBody14(String) + + static final StringBuffer append_aroundBody16(StringBuffer, int): + ALOAD_0 + ILOAD_1 + INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; (line 22) + ARETURN + end static final StringBuffer append_aroundBody16(StringBuffer, int) + + static final String toString_aroundBody18(StringBuffer): + ALOAD_0 + INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; (line 22) + ARETURN + end static final String toString_aroundBody18(StringBuffer) + + static final String getName_aroundBody20(): + ICONST_0 (line 20) + ISTORE_0 + ILOAD_0 (line 21) + LDC "name" + ASTORE_2 + method-call(int java.lang.String.hashCode()) + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 4 + | ALOAD 4 + | BIPUSH 0 + | ALOAD_2 + | AASTORE + | NEW FancyHelloWorld$AjcClosure13 + | DUP + | ALOAD 4 + | INVOKESPECIAL FancyHelloWorld$AjcClosure13.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | INVOKESTATIC org.aspectj.runtime.internal.Conversions.intValue (Ljava/lang/Object;)I + method-call(int java.lang.String.hashCode()) + IADD + ISTORE_0 + LDC "name" (line 22) + ASTORE 6 + constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 8 + | ALOAD 8 + | BIPUSH 0 + | ALOAD 6 + | AASTORE + | NEW FancyHelloWorld$AjcClosure15 + | DUP + | ALOAD 8 + | INVOKESPECIAL FancyHelloWorld$AjcClosure15.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.lang.StringBuffer + constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + ILOAD_0 + ISTORE 10 + ASTORE 12 + method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | BIPUSH 2 + | ANEWARRAY java.lang.Object + | ASTORE 14 + | ALOAD 14 + | BIPUSH 0 + | ALOAD 12 + | AASTORE + | ALOAD 14 + | BIPUSH 1 + | ILOAD 10 + | INVOKESTATIC org.aspectj.runtime.internal.Conversions.intObject (I)Ljava/lang/Object; + | AASTORE + | NEW FancyHelloWorld$AjcClosure17 + | DUP + | ALOAD 14 + | INVOKESPECIAL FancyHelloWorld$AjcClosure17.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.lang.StringBuffer + method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + ASTORE 16 + method-call(java.lang.String java.lang.StringBuffer.toString()) + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 18 + | ALOAD 18 + | BIPUSH 0 + | ALOAD 16 + | AASTORE + | NEW FancyHelloWorld$AjcClosure19 + | DUP + | ALOAD 18 + | INVOKESPECIAL FancyHelloWorld$AjcClosure19.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.lang.String + method-call(java.lang.String java.lang.StringBuffer.toString()) + ARETURN + end static final String getName_aroundBody20() +end public abstract class FancyHelloWorld + +public class FancyHelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST FancyHelloWorld + INVOKESTATIC FancyHelloWorld.init$_aroundBody0 (LFancyHelloWorld;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure1 + +public class FancyHelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + INVOKESTATIC FancyHelloWorld.out_aroundBody2 ()Ljava/io/PrintStream; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure3 + +public class FancyHelloWorld$AjcClosure5 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody4 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure5 + +public class FancyHelloWorld$AjcClosure7 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + INVOKESTATIC FancyHelloWorld.println_aroundBody6 (Ljava/io/PrintStream;Ljava/lang/Object;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure7 + +public class FancyHelloWorld$AjcClosure9 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody8 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure9 + +public class FancyHelloWorld$AjcClosure11 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST [Ljava.lang.String; + INVOKESTATIC FancyHelloWorld.main_aroundBody10 ([Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure11 + +public class FancyHelloWorld$AjcClosure13 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.hashCode_aroundBody12 (Ljava/lang/String;)I + INVOKESTATIC org.aspectj.runtime.internal.Conversions.intObject (I)Ljava/lang/Object; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure13 + +public class FancyHelloWorld$AjcClosure15 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.init$_aroundBody14 (Ljava/lang/String;)Ljava/lang/StringBuffer; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure15 + +public class FancyHelloWorld$AjcClosure17 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.StringBuffer + ALOAD_2 + BIPUSH 1 + AALOAD + INVOKESTATIC org.aspectj.runtime.internal.Conversions.intValue (Ljava/lang/Object;)I + INVOKESTATIC FancyHelloWorld.append_aroundBody16 (Ljava/lang/StringBuffer;I)Ljava/lang/StringBuffer; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure17 + +public class FancyHelloWorld$AjcClosure19 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.lang.StringBuffer + INVOKESTATIC FancyHelloWorld.toString_aroundBody18 (Ljava/lang/StringBuffer;)Ljava/lang/String; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure19 + +public class FancyHelloWorld$AjcClosure21 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + INVOKESTATIC FancyHelloWorld.getName_aroundBody20 ()Ljava/lang/String; + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure21 diff --git a/weaver/testdata/AroundAllHelloWorld.txt b/weaver/testdata/AroundAllHelloWorld.txt new file mode 100644 index 000000000..ea505e316 --- /dev/null +++ b/weaver/testdata/AroundAllHelloWorld.txt @@ -0,0 +1,183 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE_1 + | ALOAD_1 + | BIPUSH 0 + | ALOAD_0 + | AASTORE + | NEW HelloWorld$AjcClosure1 + | DUP + | ALOAD_1 + | INVOKESPECIAL HelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE 5 + method-execution(void HelloWorld.main(java.lang.String[])) + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 6 + | ALOAD 6 + | BIPUSH 0 + | ALOAD 5 + | AASTORE + | NEW HelloWorld$AjcClosure7 + | DUP + | ALOAD 6 + | INVOKESPECIAL HelloWorld$AjcClosure7.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + | RETURN + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static final void init$_aroundBody0(HelloWorld): + RETURN (line 5) + end static final void init$_aroundBody0(HelloWorld) + + static final java.io.PrintStream out_aroundBody2(): + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + ARETURN + end static final java.io.PrintStream out_aroundBody2() + + static final void println_aroundBody4(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 9) + RETURN + end static final void println_aroundBody4(java.io.PrintStream, String) + + static final void main_aroundBody6(String[]): + field-get(java.io.PrintStream java.lang.System.out) + | BIPUSH 0 + | ANEWARRAY java.lang.Object + | ASTORE_1 + | NEW HelloWorld$AjcClosure3 + | DUP + | ALOAD_1 + | INVOKESPECIAL HelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.io.PrintStream + field-get(java.io.PrintStream java.lang.System.out) + LDC "hello world" (line 9) + ASTORE_3 + ASTORE 5 + method-call(void java.io.PrintStream.println(java.lang.String)) + | BIPUSH 2 + | ANEWARRAY java.lang.Object + | ASTORE 7 + | ALOAD 7 + | BIPUSH 0 + | ALOAD 5 + | AASTORE + | ALOAD 7 + | BIPUSH 1 + | ALOAD_3 + | AASTORE + | NEW HelloWorld$AjcClosure5 + | DUP + | ALOAD 7 + | INVOKESPECIAL HelloWorld$AjcClosure5.<init> ([Ljava/lang/Object;)V + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | POP + method-call(void java.io.PrintStream.println(java.lang.String)) + RETURN (line 11) + end static final void main_aroundBody6(String[]) +end public class HelloWorld + +public class HelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST HelloWorld + INVOKESTATIC HelloWorld.init$_aroundBody0 (LHelloWorld;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure1 + +public class HelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + INVOKESTATIC HelloWorld.out_aroundBody2 ()Ljava/io/PrintStream; + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure3 + +public class HelloWorld$AjcClosure5 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC HelloWorld.println_aroundBody4 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure5 + +public class HelloWorld$AjcClosure7 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST [Ljava.lang.String; + INVOKESTATIC HelloWorld.main_aroundBody6 ([Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure7 diff --git a/weaver/testdata/AroundAndOthersFancyHelloWorld.txt b/weaver/testdata/AroundAndOthersFancyHelloWorld.txt new file mode 100644 index 000000000..a8a2bd44e --- /dev/null +++ b/weaver/testdata/AroundAndOthersFancyHelloWorld.txt @@ -0,0 +1,375 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | ASTORE 5 + | | | ASTORE 6 + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | | | | BIPUSH 2 + | | | | ANEWARRAY java.lang.Object + | | | | ASTORE 8 + | | | | ALOAD 8 + | | | | BIPUSH 0 + | | | | ALOAD 6 + | | | | AASTORE + | | | | ALOAD 8 + | | | | BIPUSH 1 + | | | | ALOAD 5 + | | | | AASTORE + | | | | NEW FancyHelloWorld$AjcClosure3 + | | | | DUP + | | | | ALOAD 8 + | | | | INVOKESPECIAL FancyHelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V + | | | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | | | POP + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L0 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | ASTORE 9 + | | ASTORE 10 + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | | | BIPUSH 2 + | | | ANEWARRAY java.lang.Object + | | | ASTORE 12 + | | | ALOAD 12 + | | | BIPUSH 0 + | | | ALOAD 10 + | | | AASTORE + | | | ALOAD 12 + | | | BIPUSH 1 + | | | ALOAD 9 + | | | AASTORE + | | | NEW FancyHelloWorld$AjcClosure7 + | | | DUP + | | | ALOAD 12 + | | | INVOKESPECIAL FancyHelloWorld$AjcClosure7.<init> ([Ljava/lang/Object;)V + | | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | | POP + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L0 + | E1: ASTORE 4 (line 14) + | JSR L1 + | ALOAD 4 + | ATHROW + | L0: JSR L1 + | GOTO L2 + | L1: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | ASTORE 13 + | ASTORE 14 + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | | BIPUSH 2 + | | ANEWARRAY java.lang.Object + | | ASTORE 16 + | | ALOAD 16 + | | BIPUSH 0 + | | ALOAD 14 + | | AASTORE + | | ALOAD 16 + | | BIPUSH 1 + | | ALOAD 13 + | | AASTORE + | | NEW FancyHelloWorld$AjcClosure11 + | | DUP + | | ALOAD 16 + | | INVOKESPECIAL FancyHelloWorld$AjcClosure11.<init> ([Ljava/lang/Object;)V + | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | POP + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L2: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() + + static final void println_aroundBody0(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 11) + RETURN + end static final void println_aroundBody0(java.io.PrintStream, String) + + static final void println_aroundBody2(java.io.PrintStream, String): + INVOKESTATIC Aspect.ajc_before_method_execution ()V + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ALOAD_1 + AASTORE + NEW FancyHelloWorld$AjcClosure1 + DUP + ALOAD_2 + INVOKESPECIAL FancyHelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void println_aroundBody2(java.io.PrintStream, String) + + static final void println_aroundBody4(java.io.PrintStream, Object): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V (line 13) + RETURN + end static final void println_aroundBody4(java.io.PrintStream, Object) + + static final void println_aroundBody6(java.io.PrintStream, Object): + INVOKESTATIC Aspect.ajc_before_method_execution ()V + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ALOAD_1 + AASTORE + NEW FancyHelloWorld$AjcClosure5 + DUP + ALOAD_2 + INVOKESPECIAL FancyHelloWorld$AjcClosure5.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void println_aroundBody6(java.io.PrintStream, Object) + + static final void println_aroundBody8(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 15) + RETURN + end static final void println_aroundBody8(java.io.PrintStream, String) + + static final void println_aroundBody10(java.io.PrintStream, String): + INVOKESTATIC Aspect.ajc_before_method_execution ()V + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ALOAD_1 + AASTORE + NEW FancyHelloWorld$AjcClosure9 + DUP + ALOAD_2 + INVOKESPECIAL FancyHelloWorld$AjcClosure9.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void println_aroundBody10(java.io.PrintStream, String) +end public abstract class FancyHelloWorld + +public class FancyHelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody0 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure1 + +public class FancyHelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody2 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure3 + +public class FancyHelloWorld$AjcClosure5 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + INVOKESTATIC FancyHelloWorld.println_aroundBody4 (Ljava/io/PrintStream;Ljava/lang/Object;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure5 + +public class FancyHelloWorld$AjcClosure7 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + INVOKESTATIC FancyHelloWorld.println_aroundBody6 (Ljava/io/PrintStream;Ljava/lang/Object;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure7 + +public class FancyHelloWorld$AjcClosure9 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody8 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure9 + +public class FancyHelloWorld$AjcClosure11 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody10 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure11 diff --git a/weaver/testdata/AroundAndOthersHelloWorld.txt b/weaver/testdata/AroundAndOthersHelloWorld.txt new file mode 100644 index 000000000..66240b877 --- /dev/null +++ b/weaver/testdata/AroundAndOthersHelloWorld.txt @@ -0,0 +1,122 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | ASTORE_1 + | ASTORE_2 + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | | BIPUSH 2 + | | ANEWARRAY java.lang.Object + | | ASTORE 4 + | | ALOAD 4 + | | BIPUSH 0 + | | ALOAD_2 + | | AASTORE + | | ALOAD 4 + | | BIPUSH 1 + | | ALOAD_1 + | | AASTORE + | | NEW HelloWorld$AjcClosure3 + | | DUP + | | ALOAD 4 + | | INVOKESPECIAL HelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V + | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | POP + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static final void println_aroundBody0(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 9) + RETURN + end static final void println_aroundBody0(java.io.PrintStream, String) + + static final void println_aroundBody2(java.io.PrintStream, String): + INVOKESTATIC Aspect.ajc_before_method_execution ()V + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ALOAD_1 + AASTORE + NEW HelloWorld$AjcClosure1 + DUP + ALOAD_2 + INVOKESPECIAL HelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + POP + RETURN + end static final void println_aroundBody2(java.io.PrintStream, String) +end public class HelloWorld + +public class HelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC HelloWorld.println_aroundBody0 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure1 + +public class HelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC HelloWorld.println_aroundBody2 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure3 diff --git a/weaver/testdata/AroundArgsDynamicHelloWorld.txt b/weaver/testdata/AroundArgsDynamicHelloWorld.txt new file mode 100644 index 000000000..5ca21c9b5 --- /dev/null +++ b/weaver/testdata/AroundArgsDynamicHelloWorld.txt @@ -0,0 +1,133 @@ +public class DynamicHelloWorld extends java.lang.Object implements java.io.Serializable: + public void <init>(): + ALOAD_0 // DynamicHelloWorld this (line 8) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void DynamicHelloWorld.<init>()) + | RETURN + constructor-execution(void DynamicHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + | catch java.lang.UnsupportedOperationException -> E0 + | | NEW DynamicHelloWorld (line 12) + | | DUP + | | constructor-call(void DynamicHelloWorld.<init>()) + | | | INVOKESPECIAL DynamicHelloWorld.<init> ()V + | | constructor-call(void DynamicHelloWorld.<init>()) + | | LDC "hello" + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | | GETSTATIC java.util.Collections.EMPTY_LIST Ljava/util/List; + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | | INVOKEVIRTUAL DynamicHelloWorld.doit (Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | POP + | | GOTO L0 + | catch java.lang.UnsupportedOperationException -> E0 + | E0: ASTORE_1 (line 13) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 14) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | LDC "expected and caught: " + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ALOAD_1 // java.lang.UnsupportedOperationException t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 15) + | L0: NEW java.lang.RuntimeException (line 17) + | DUP + | LDC "should have caught exception" + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.RuntimeException.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | ATHROW + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + String doit(String, java.util.List): + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | ALOAD_2 // java.util.List l (line 21) + | ALOAD_1 // java.lang.String arg0 + | ASTORE_3 + | ASTORE 4 + | method-call(boolean java.util.List.add(java.lang.Object)) + | | ALOAD 4 + | | INSTANCEOF java.util.ArrayList + | | IFEQ L0 + | | ALOAD 4 + | | CHECKCAST java.util.ArrayList + | | BIPUSH 2 + | | ANEWARRAY java.lang.Object + | | ASTORE 5 + | | ALOAD 5 + | | BIPUSH 0 + | | ALOAD 4 + | | AASTORE + | | ALOAD 5 + | | BIPUSH 1 + | | ALOAD_3 + | | AASTORE + | | NEW DynamicHelloWorld$AjcClosure1 + | | DUP + | | ALOAD 5 + | | INVOKESPECIAL DynamicHelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + | | INVOKESTATIC Aspect.ajc_around0 (Ljava/util/ArrayList;Lorg/aspectj/runtime/internal/AroundClosure;)Z + | | GOTO L1 + | | L0: ALOAD 4 + | | ALOAD_3 + | | INVOKESTATIC DynamicHelloWorld.add_aroundBody0 (Ljava/util/List;Ljava/lang/Object;)Z + | | L1: NOP + | method-call(boolean java.util.List.add(java.lang.Object)) + | POP + | ALOAD_2 // java.util.List l (line 22) + | method-call(java.lang.String java.lang.Object.toString()) + | | INVOKEVIRTUAL java.lang.Object.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.Object.toString()) + | ARETURN + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + end String doit(String, java.util.List) + + static final boolean add_aroundBody0(java.util.List, Object): + ALOAD_0 + ALOAD_1 + INVOKEINTERFACE java.util.List.add (Ljava/lang/Object;)Z (line 21) + IRETURN + end static final boolean add_aroundBody0(java.util.List, Object) +end public class DynamicHelloWorld + +public class DynamicHelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_1 + BIPUSH 0 + AALOAD + CHECKCAST java.util.List + ALOAD_2 + BIPUSH 1 + AALOAD + INVOKESTATIC DynamicHelloWorld.add_aroundBody0 (Ljava/util/List;Ljava/lang/Object;)Z + INVOKESTATIC org.aspectj.runtime.internal.Conversions.booleanObject (Z)Ljava/lang/Object; + ARETURN + end public Object run(Object[]) +end public class DynamicHelloWorld$AjcClosure1 diff --git a/weaver/testdata/AroundFancyHelloWorld.txt b/weaver/testdata/AroundFancyHelloWorld.txt new file mode 100644 index 000000000..f558cb548 --- /dev/null +++ b/weaver/testdata/AroundFancyHelloWorld.txt @@ -0,0 +1,229 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | ASTORE 5 + | | | ASTORE 6 + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | BIPUSH 2 + | | | | ANEWARRAY java.lang.Object + | | | | ASTORE 7 + | | | | ALOAD 7 + | | | | BIPUSH 0 + | | | | ALOAD 6 + | | | | AASTORE + | | | | ALOAD 7 + | | | | BIPUSH 1 + | | | | ALOAD 5 + | | | | AASTORE + | | | | NEW FancyHelloWorld$AjcClosure1 + | | | | DUP + | | | | ALOAD 7 + | | | | INVOKESPECIAL FancyHelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + | | | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | | | POP + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L0 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | ASTORE 8 + | | ASTORE 9 + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | BIPUSH 2 + | | | ANEWARRAY java.lang.Object + | | | ASTORE 10 + | | | ALOAD 10 + | | | BIPUSH 0 + | | | ALOAD 9 + | | | AASTORE + | | | ALOAD 10 + | | | BIPUSH 1 + | | | ALOAD 8 + | | | AASTORE + | | | NEW FancyHelloWorld$AjcClosure3 + | | | DUP + | | | ALOAD 10 + | | | INVOKESPECIAL FancyHelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V + | | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | | POP + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L0 + | E1: ASTORE 4 (line 14) + | JSR L1 + | ALOAD 4 + | ATHROW + | L0: JSR L1 + | GOTO L2 + | L1: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | ASTORE 11 + | ASTORE 12 + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | BIPUSH 2 + | | ANEWARRAY java.lang.Object + | | ASTORE 13 + | | ALOAD 13 + | | BIPUSH 0 + | | ALOAD 12 + | | AASTORE + | | ALOAD 13 + | | BIPUSH 1 + | | ALOAD 11 + | | AASTORE + | | NEW FancyHelloWorld$AjcClosure5 + | | DUP + | | ALOAD 13 + | | INVOKESPECIAL FancyHelloWorld$AjcClosure5.<init> ([Ljava/lang/Object;)V + | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | POP + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L2: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() + + static final void println_aroundBody0(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 11) + RETURN + end static final void println_aroundBody0(java.io.PrintStream, String) + + static final void println_aroundBody2(java.io.PrintStream, Object): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V (line 13) + RETURN + end static final void println_aroundBody2(java.io.PrintStream, Object) + + static final void println_aroundBody4(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 15) + RETURN + end static final void println_aroundBody4(java.io.PrintStream, String) +end public abstract class FancyHelloWorld + +public class FancyHelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody0 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure1 + +public class FancyHelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + INVOKESTATIC FancyHelloWorld.println_aroundBody2 (Ljava/io/PrintStream;Ljava/lang/Object;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure3 + +public class FancyHelloWorld$AjcClosure5 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC FancyHelloWorld.println_aroundBody4 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class FancyHelloWorld$AjcClosure5 diff --git a/weaver/testdata/AroundHelloWorld.txt b/weaver/testdata/AroundHelloWorld.txt new file mode 100644 index 000000000..dcddb75fa --- /dev/null +++ b/weaver/testdata/AroundHelloWorld.txt @@ -0,0 +1,73 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | ASTORE_1 + | ASTORE_2 + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | BIPUSH 2 + | | ANEWARRAY java.lang.Object + | | ASTORE_3 + | | ALOAD_3 + | | BIPUSH 0 + | | ALOAD_2 + | | AASTORE + | | ALOAD_3 + | | BIPUSH 1 + | | ALOAD_1 + | | AASTORE + | | NEW HelloWorld$AjcClosure1 + | | DUP + | | ALOAD_3 + | | INVOKESPECIAL HelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + | | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | | POP + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static final void println_aroundBody0(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 9) + RETURN + end static final void println_aroundBody0(java.io.PrintStream, String) +end public class HelloWorld + +public class HelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + INVOKESTATIC HelloWorld.println_aroundBody0 (Ljava/io/PrintStream;Ljava/lang/String;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure1 diff --git a/weaver/testdata/BeforeFancyHelloWorld.txt b/weaver/testdata/BeforeFancyHelloWorld.txt new file mode 100644 index 000000000..18136b693 --- /dev/null +++ b/weaver/testdata/BeforeFancyHelloWorld.txt @@ -0,0 +1,90 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | INVOKESTATIC Aspect.ajc_before_constructor_execution ()V + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | field-get(java.io.PrintStream java.lang.System.out) + | | INVOKESTATIC Aspect.ajc_before_field_get ()V + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L0 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L0 + | E1: ASTORE 4 (line 14) + | JSR L1 + | ALOAD 4 + | ATHROW + | L0: JSR L1 + | GOTO L2 + | L1: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L2: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | LDC "name" (line 22) + | ASTORE_1 + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESTATIC Aspect.ajc_before_constructor_call ()V + | | NEW java.lang.StringBuffer + | | DUP + | | ALOAD_1 + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/BeforeHelloWorld.txt b/weaver/testdata/BeforeHelloWorld.txt new file mode 100644 index 000000000..3fc3fa818 --- /dev/null +++ b/weaver/testdata/BeforeHelloWorld.txt @@ -0,0 +1,26 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | INVOKESTATIC Aspect.ajc_before_constructor_execution ()V + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | field-get(java.io.PrintStream java.lang.System.out) + | | INVOKESTATIC Aspect.ajc_before_field_get ()V + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/CflowNonStaticBeforeFancyHelloWorld.txt b/weaver/testdata/CflowNonStaticBeforeFancyHelloWorld.txt new file mode 100644 index 000000000..cb71eca4b --- /dev/null +++ b/weaver/testdata/CflowNonStaticBeforeFancyHelloWorld.txt @@ -0,0 +1,92 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | INVOKESTATIC Aspect.ajc$perCflowPush ()V + | catch java.lang.Throwable -> E2 + | | field-get(java.io.PrintStream java.lang.System.out) + | | | INVOKESTATIC Aspect.hasAspect ()Z + | | | IFEQ L0 + | | | INVOKESTATIC Aspect.aspectOf ()LAspect; + | | | INVOKEVIRTUAL Aspect.ajc_before ()V + | | | L0: GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | | field-get(java.io.PrintStream java.lang.System.out) + | | ASTORE_1 + | | finally -> E1 + | | | catch java.lang.Exception -> E0 + | | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | | LDC "bye" + | | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | GOTO L1 + | | | catch java.lang.Exception -> E0 + | | | E0: ASTORE_2 (line 12) + | | | ALOAD_1 // java.io.PrintStream out (line 13) + | | | ALOAD_2 // java.lang.Exception e + | | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | finally -> E1 + | | GOTO L1 + | | E1: ASTORE 4 (line 14) + | | JSR L2 + | | ALOAD 4 + | | ATHROW + | | L1: JSR L2 + | | GOTO L3 + | | L2: ASTORE_3 + | | ALOAD_1 // java.io.PrintStream out (line 15) + | | LDC "finally" + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | RET 3 (line 10) + | | L3: GOTO L4 (line 17) + | catch java.lang.Throwable -> E2 + | E2: ASTORE 6 + | GETSTATIC Aspect.ajc$perCflowStack Lorg/aspectj/runtime/internal/CFlowStack; + | INVOKEVIRTUAL org.aspectj.runtime.internal.CFlowStack.pop ()V + | ALOAD 6 + | ATHROW + | L4: GETSTATIC Aspect.ajc$perCflowStack Lorg/aspectj/runtime/internal/CFlowStack; + | INVOKEVIRTUAL org.aspectj.runtime.internal.CFlowStack.pop ()V + | RETURN + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/CflowNonStaticBeforeHelloWorld.txt b/weaver/testdata/CflowNonStaticBeforeHelloWorld.txt new file mode 100644 index 000000000..a2a9d3cc0 --- /dev/null +++ b/weaver/testdata/CflowNonStaticBeforeHelloWorld.txt @@ -0,0 +1,37 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | INVOKESTATIC Aspect.ajc$perCflowPush ()V + | catch java.lang.Throwable -> E0 + | | field-get(java.io.PrintStream java.lang.System.out) + | | | INVOKESTATIC Aspect.hasAspect ()Z + | | | IFEQ L0 + | | | INVOKESTATIC Aspect.aspectOf ()LAspect; + | | | INVOKEVIRTUAL Aspect.ajc_before ()V + | | | L0: GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | | field-get(java.io.PrintStream java.lang.System.out) + | | LDC "hello world" (line 9) + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | GOTO L1 (line 11) + | catch java.lang.Throwable -> E0 + | E0: ASTORE_2 + | GETSTATIC Aspect.ajc$perCflowStack Lorg/aspectj/runtime/internal/CFlowStack; + | INVOKEVIRTUAL org.aspectj.runtime.internal.CFlowStack.pop ()V + | ALOAD_2 + | ATHROW + | L1: GETSTATIC Aspect.ajc$perCflowStack Lorg/aspectj/runtime/internal/CFlowStack; + | INVOKEVIRTUAL org.aspectj.runtime.internal.CFlowStack.pop ()V + | RETURN + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/CflowStateResidueDynamicHelloWorld.txt b/weaver/testdata/CflowStateResidueDynamicHelloWorld.txt new file mode 100644 index 000000000..fd6bfd650 --- /dev/null +++ b/weaver/testdata/CflowStateResidueDynamicHelloWorld.txt @@ -0,0 +1,119 @@ +public class DynamicHelloWorld extends java.lang.Object implements java.io.Serializable: + public void <init>(): + ALOAD_0 // DynamicHelloWorld this (line 8) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void DynamicHelloWorld.<init>()) + | RETURN + constructor-execution(void DynamicHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + | GETSTATIC Aspect.ajc$cflowStack$0 Lorg/aspectj/runtime/internal/CFlowStack; + | INVOKEVIRTUAL org.aspectj.runtime.internal.CFlowStack.isValid ()Z + | IFEQ L0 + | GETSTATIC Aspect.ajc$cflowStack$0 Lorg/aspectj/runtime/internal/CFlowStack; + | BIPUSH 0 + | INVOKEVIRTUAL org.aspectj.runtime.internal.CFlowStack.get (I)Ljava/lang/Object; + | CHECKCAST java.util.ArrayList + | INVOKESTATIC Aspect.ajc_before_0 (Ljava/util/ArrayList;)V + | catch java.lang.UnsupportedOperationException -> E0 + | | L0: NEW DynamicHelloWorld (line 12) + | | DUP + | | constructor-call(void DynamicHelloWorld.<init>()) + | | | INVOKESPECIAL DynamicHelloWorld.<init> ()V + | | constructor-call(void DynamicHelloWorld.<init>()) + | | LDC "hello" + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | | GETSTATIC java.util.Collections.EMPTY_LIST Ljava/util/List; + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | | INVOKEVIRTUAL DynamicHelloWorld.doit (Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | POP + | | GOTO L1 + | catch java.lang.UnsupportedOperationException -> E0 + | E0: ASTORE_1 (line 13) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 14) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | LDC "expected and caught: " + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ALOAD_1 // java.lang.UnsupportedOperationException t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 15) + | L1: NEW java.lang.RuntimeException (line 17) + | DUP + | LDC "should have caught exception" + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.RuntimeException.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | ATHROW + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + String doit(String, java.util.List): + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | ALOAD_2 // java.util.List l (line 21) + | ALOAD_1 // java.lang.String arg0 + | ASTORE_3 + | ASTORE 4 + | method-call(boolean java.util.List.add(java.lang.Object)) + | | BIPUSH 0 + | | ISTORE 5 + | | ALOAD 4 + | | INSTANCEOF java.util.ArrayList + | | IFEQ L0 + | | BIPUSH 1 + | | ISTORE 5 + | | BIPUSH 1 + | | ANEWARRAY java.lang.Object + | | ASTORE 6 + | | ALOAD 6 + | | BIPUSH 0 + | | ALOAD 4 + | | AASTORE + | | GETSTATIC Aspect.ajc$cflowStack$0 Lorg/aspectj/runtime/internal/CFlowStack; + | | ALOAD 6 + | | INVOKEVIRTUAL org.aspectj.runtime.internal.CFlowStack.push ([Ljava/lang/Object;)V + | | catch java.lang.Throwable -> E0 + | | | L0: ALOAD 4 + | | | ALOAD_3 + | | | INVOKEINTERFACE java.util.List.add (Ljava/lang/Object;)Z + | | catch java.lang.Throwable -> E0 + | | GOTO L2 + | | E0: ASTORE 7 + | | ILOAD 5 + | | IFEQ L1 + | | GETSTATIC Aspect.ajc$cflowStack$0 Lorg/aspectj/runtime/internal/CFlowStack; + | | INVOKEVIRTUAL org.aspectj.runtime.internal.CFlowStack.pop ()V + | | L1: ALOAD 7 + | | ATHROW + | | L2: NOP + | | ILOAD 5 + | | IFEQ L3 + | | GETSTATIC Aspect.ajc$cflowStack$0 Lorg/aspectj/runtime/internal/CFlowStack; + | | INVOKEVIRTUAL org.aspectj.runtime.internal.CFlowStack.pop ()V + | | L3: NOP + | method-call(boolean java.util.List.add(java.lang.Object)) + | POP + | ALOAD_2 // java.util.List l (line 22) + | method-call(java.lang.String java.lang.Object.toString()) + | | INVOKEVIRTUAL java.lang.Object.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.Object.toString()) + | ARETURN + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + end String doit(String, java.util.List) +end public class DynamicHelloWorld diff --git a/weaver/testdata/ExtractedFancyHelloWorld.txt b/weaver/testdata/ExtractedFancyHelloWorld.txt new file mode 100644 index 000000000..378da90b8 --- /dev/null +++ b/weaver/testdata/ExtractedFancyHelloWorld.txt @@ -0,0 +1,169 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | ALOAD_0 + | INVOKESTATIC FancyHelloWorld.init$_extracted0 (LFancyHelloWorld;)V + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE 11 + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | ALOAD 11 + | INVOKESTATIC FancyHelloWorld.main_extracted5 ([Ljava/lang/String;)V + | RETURN + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | INVOKESTATIC FancyHelloWorld.getName_extracted10 ()Ljava/lang/String; + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() + + static final void init$_extracted0(FancyHelloWorld): + RETURN (line 7) + end static final void init$_extracted0(FancyHelloWorld) + + static final java.io.PrintStream out_extracted1(): + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + ARETURN + end static final java.io.PrintStream out_extracted1() + + static final void println_extracted2(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 11) + RETURN + end static final void println_extracted2(java.io.PrintStream, String) + + static final void println_extracted3(java.io.PrintStream, Object): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V (line 13) + RETURN + end static final void println_extracted3(java.io.PrintStream, Object) + + static final void println_extracted4(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 15) + RETURN + end static final void println_extracted4(java.io.PrintStream, String) + + static final void main_extracted5(String[]): + field-get(java.io.PrintStream java.lang.System.out) + | INVOKESTATIC FancyHelloWorld.out_extracted1 ()Ljava/io/PrintStream; + field-get(java.io.PrintStream java.lang.System.out) + ASTORE_1 (line 9) + finally -> E1 + | catch java.lang.Exception -> E0 + | | ALOAD_1 (line 11) + | | LDC "bye" + | | ASTORE_3 + | | ASTORE 5 + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | ALOAD 5 + | | | ALOAD_3 + | | | INVOKESTATIC FancyHelloWorld.println_extracted2 (Ljava/io/PrintStream;Ljava/lang/String;)V + | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | GOTO L0 + | catch java.lang.Exception -> E0 + | E0: ASTORE 7 (line 12) + | ALOAD_1 (line 13) + | ALOAD 7 + | ASTORE 9 + | ASTORE 11 + | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | ALOAD 11 + | | ALOAD 9 + | | INVOKESTATIC FancyHelloWorld.println_extracted3 (Ljava/io/PrintStream;Ljava/lang/Object;)V + | method-call(void java.io.PrintStream.println(java.lang.Object)) + finally -> E1 + GOTO L0 + E1: ASTORE 13 (line 14) + JSR L1 + ALOAD 13 + ATHROW + L0: JSR L1 + GOTO L2 + L1: ASTORE 15 + ALOAD_1 (line 15) + LDC "finally" + ASTORE 17 + ASTORE 19 + method-call(void java.io.PrintStream.println(java.lang.String)) + | ALOAD 19 + | ALOAD 17 + | INVOKESTATIC FancyHelloWorld.println_extracted4 (Ljava/io/PrintStream;Ljava/lang/String;)V + method-call(void java.io.PrintStream.println(java.lang.String)) + RET 15 (line 10) + L2: RETURN (line 17) + end static final void main_extracted5(String[]) + + static final int hashCode_extracted6(String): + ALOAD_0 + INVOKEVIRTUAL java.lang.String.hashCode ()I (line 21) + IRETURN + end static final int hashCode_extracted6(String) + + static final StringBuffer init$_extracted7(String): + NEW java.lang.StringBuffer + DUP + ALOAD_0 + INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V (line 22) + ARETURN + end static final StringBuffer init$_extracted7(String) + + static final StringBuffer append_extracted8(StringBuffer, int): + ALOAD_0 + ILOAD_1 + INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; (line 22) + ARETURN + end static final StringBuffer append_extracted8(StringBuffer, int) + + static final String toString_extracted9(StringBuffer): + ALOAD_0 + INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; (line 22) + ARETURN + end static final String toString_extracted9(StringBuffer) + + static final String getName_extracted10(): + ICONST_0 (line 20) + ISTORE_0 + ILOAD_0 (line 21) + LDC "name" + ASTORE_2 + method-call(int java.lang.String.hashCode()) + | ALOAD_2 + | INVOKESTATIC FancyHelloWorld.hashCode_extracted6 (Ljava/lang/String;)I + method-call(int java.lang.String.hashCode()) + IADD + ISTORE_0 + LDC "name" (line 22) + ASTORE 4 + constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ALOAD 4 + | INVOKESTATIC FancyHelloWorld.init$_extracted7 (Ljava/lang/String;)Ljava/lang/StringBuffer; + constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + ILOAD_0 + ISTORE 6 + ASTORE 8 + method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | ALOAD 8 + | ILOAD 6 + | INVOKESTATIC FancyHelloWorld.append_extracted8 (Ljava/lang/StringBuffer;I)Ljava/lang/StringBuffer; + method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + ASTORE 10 + method-call(java.lang.String java.lang.StringBuffer.toString()) + | ALOAD 10 + | INVOKESTATIC FancyHelloWorld.toString_extracted9 (Ljava/lang/StringBuffer;)Ljava/lang/String; + method-call(java.lang.String java.lang.StringBuffer.toString()) + ARETURN + end static final String getName_extracted10() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/ExtractedHelloWorld.txt b/weaver/testdata/ExtractedHelloWorld.txt new file mode 100644 index 000000000..7ac93cbef --- /dev/null +++ b/weaver/testdata/ExtractedHelloWorld.txt @@ -0,0 +1,52 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | ALOAD_0 + | INVOKESTATIC HelloWorld.init$_extracted (LHelloWorld;)V + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE_3 + method-execution(void HelloWorld.main(java.lang.String[])) + | ALOAD_3 + | INVOKESTATIC HelloWorld.main_extracted ([Ljava/lang/String;)V + | RETURN + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static final void init$_extracted(HelloWorld): + RETURN (line 5) + end static final void init$_extracted(HelloWorld) + + static final java.io.PrintStream out_extracted(): + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + ARETURN + end static final java.io.PrintStream out_extracted() + + static final void println_extracted(java.io.PrintStream, String): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 9) + RETURN + end static final void println_extracted(java.io.PrintStream, String) + + static final void main_extracted(String[]): + field-get(java.io.PrintStream java.lang.System.out) + | INVOKESTATIC HelloWorld.out_extracted ()Ljava/io/PrintStream; + field-get(java.io.PrintStream java.lang.System.out) + LDC "hello world" (line 9) + ASTORE_1 + ASTORE_3 + method-call(void java.io.PrintStream.println(java.lang.String)) + | ALOAD_3 + | ALOAD_1 + | INVOKESTATIC HelloWorld.println_extracted (Ljava/io/PrintStream;Ljava/lang/String;)V + method-call(void java.io.PrintStream.println(java.lang.String)) + RETURN (line 11) + end static final void main_extracted(String[]) +end public class HelloWorld diff --git a/weaver/testdata/FieldSet.txt b/weaver/testdata/FieldSet.txt new file mode 100644 index 000000000..c89c7e7bc --- /dev/null +++ b/weaver/testdata/FieldSet.txt @@ -0,0 +1,68 @@ +public class FieldyHelloWorld extends java.lang.Object: + public static String str + static void <clinit>(): + staticinitialization(void FieldyHelloWorld.<clinit>()) + | LDC "Hello" (line 3) + | field-set(java.lang.String FieldyHelloWorld.str) + | | PUTSTATIC FieldyHelloWorld.str Ljava/lang/String; + | field-set(java.lang.String FieldyHelloWorld.str) + | RETURN (line 1) + staticinitialization(void FieldyHelloWorld.<clinit>()) + end static void <clinit>() + + public void <init>(): + ALOAD_0 // FieldyHelloWorld this (line 1) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FieldyHelloWorld.<init>()) + | INVOKESTATIC Aspect.ajc_before_constructor_execution ()V + | RETURN + constructor-execution(void FieldyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FieldyHelloWorld.main(java.lang.String[])) + | INVOKESTATIC Aspect.ajc_before_method_execution ()V + | field-get(java.lang.String FieldyHelloWorld.str) + | | INVOKESTATIC Aspect.ajc_before_field_get ()V + | | GETSTATIC FieldyHelloWorld.str Ljava/lang/String; (line 6) + | field-get(java.lang.String FieldyHelloWorld.str) + | method-call(java.lang.String java.lang.String.valueOf(java.lang.Object)) + | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | INVOKESTATIC java.lang.String.valueOf (Ljava/lang/Object;)Ljava/lang/String; + | method-call(java.lang.String java.lang.String.valueOf(java.lang.Object)) + | ASTORE_1 + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESTATIC Aspect.ajc_before_constructor_call ()V + | | NEW java.lang.StringBuffer + | | DUP + | | ALOAD_1 + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | LDC " World" + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.String)) + | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/String;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.String)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | field-set(java.lang.String FieldyHelloWorld.str) + | | PUTSTATIC FieldyHelloWorld.str Ljava/lang/String; + | field-set(java.lang.String FieldyHelloWorld.str) + | field-get(java.io.PrintStream java.lang.System.out) + | | INVOKESTATIC Aspect.ajc_before_field_get ()V + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | field-get(java.lang.String FieldyHelloWorld.str) + | | INVOKESTATIC Aspect.ajc_before_field_get ()V + | | GETSTATIC FieldyHelloWorld.str Ljava/lang/String; + | field-get(java.lang.String FieldyHelloWorld.str) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKESTATIC Aspect.ajc_before_method_call ()V + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 9) + method-execution(void FieldyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class FieldyHelloWorld diff --git a/weaver/testdata/IdDummyAspect.txt b/weaver/testdata/IdDummyAspect.txt new file mode 100644 index 000000000..17ec9dac5 --- /dev/null +++ b/weaver/testdata/IdDummyAspect.txt @@ -0,0 +1,16 @@ +public abstract class DummyAspect extends java.lang.Object: + public void <init>(): + ALOAD_0 // DummyAspect this (line 1) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void DummyAspect.<init>()) + | RETURN + constructor-execution(void DummyAspect.<init>()) + end public void <init>() + + public void ajc$before$DummyAspect$57(Object) AdviceAttribute(before, traced(BindingTypePattern(java.lang.Object, 0)), 0, 87) +: + advice-execution(void DummyAspect.ajc$before$DummyAspect$57(java.lang.Object)) + | RETURN (line 5) + advice-execution(void DummyAspect.ajc$before$DummyAspect$57(java.lang.Object)) + end public void ajc$before$DummyAspect$57(Object) +end public abstract class DummyAspect diff --git a/weaver/testdata/IdFancyHelloWorld.txt b/weaver/testdata/IdFancyHelloWorld.txt new file mode 100644 index 000000000..86d44a554 --- /dev/null +++ b/weaver/testdata/IdFancyHelloWorld.txt @@ -0,0 +1,77 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L0 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L0 + | E1: ASTORE 4 (line 14) + | JSR L1 + | ALOAD 4 + | ATHROW + | L0: JSR L1 + | GOTO L2 + | L1: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L2: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/IdHelloWorld.txt b/weaver/testdata/IdHelloWorld.txt new file mode 100644 index 000000000..dfd6deff9 --- /dev/null +++ b/weaver/testdata/IdHelloWorld.txt @@ -0,0 +1,22 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/NoResidueDynamicHelloWorld.txt b/weaver/testdata/NoResidueDynamicHelloWorld.txt new file mode 100644 index 000000000..9ae90cc05 --- /dev/null +++ b/weaver/testdata/NoResidueDynamicHelloWorld.txt @@ -0,0 +1,75 @@ +public class DynamicHelloWorld extends java.lang.Object implements java.io.Serializable: + public void <init>(): + ALOAD_0 // DynamicHelloWorld this (line 8) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void DynamicHelloWorld.<init>()) + | RETURN + constructor-execution(void DynamicHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + | catch java.lang.UnsupportedOperationException -> E0 + | | NEW DynamicHelloWorld (line 12) + | | DUP + | | constructor-call(void DynamicHelloWorld.<init>()) + | | | INVOKESPECIAL DynamicHelloWorld.<init> ()V + | | constructor-call(void DynamicHelloWorld.<init>()) + | | LDC "hello" + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | | GETSTATIC java.util.Collections.EMPTY_LIST Ljava/util/List; + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | | INVOKEVIRTUAL DynamicHelloWorld.doit (Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | POP + | | GOTO L0 + | catch java.lang.UnsupportedOperationException -> E0 + | E0: ASTORE_1 (line 13) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 14) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | LDC "expected and caught: " + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ALOAD_1 // java.lang.UnsupportedOperationException t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 15) + | L0: NEW java.lang.RuntimeException (line 17) + | DUP + | LDC "should have caught exception" + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.RuntimeException.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | ATHROW + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + String doit(String, java.util.List): + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | ALOAD_2 // java.util.List l (line 21) + | ALOAD_1 // java.lang.String arg0 + | method-call(boolean java.util.List.add(java.lang.Object)) + | | INVOKESTATIC Aspect.ajc_before_0 ()V + | | INVOKEINTERFACE java.util.List.add (Ljava/lang/Object;)Z + | method-call(boolean java.util.List.add(java.lang.Object)) + | POP + | ALOAD_2 // java.util.List l (line 22) + | method-call(java.lang.String java.lang.Object.toString()) + | | INVOKEVIRTUAL java.lang.Object.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.Object.toString()) + | ARETURN + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + end String doit(String, java.util.List) +end public class DynamicHelloWorld diff --git a/weaver/testdata/NonStaticBeforeFancyHelloWorld.txt b/weaver/testdata/NonStaticBeforeFancyHelloWorld.txt new file mode 100644 index 000000000..84821964a --- /dev/null +++ b/weaver/testdata/NonStaticBeforeFancyHelloWorld.txt @@ -0,0 +1,79 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC Aspect.ajc$perSingletonInstance LAspect; + | | INVOKEVIRTUAL Aspect.ajc_before ()V + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L0 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L0 + | E1: ASTORE 4 (line 14) + | JSR L1 + | ALOAD 4 + | ATHROW + | L0: JSR L1 + | GOTO L2 + | L1: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L2: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/NonStaticBeforeHelloWorld.txt b/weaver/testdata/NonStaticBeforeHelloWorld.txt new file mode 100644 index 000000000..2786f0844 --- /dev/null +++ b/weaver/testdata/NonStaticBeforeHelloWorld.txt @@ -0,0 +1,24 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC Aspect.ajc$perSingletonInstance LAspect; + | | INVOKEVIRTUAL Aspect.ajc_before ()V + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/PatternWeaveFancyHelloWorld.txt b/weaver/testdata/PatternWeaveFancyHelloWorld.txt new file mode 100644 index 000000000..86d44a554 --- /dev/null +++ b/weaver/testdata/PatternWeaveFancyHelloWorld.txt @@ -0,0 +1,77 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L0 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L0 + | E1: ASTORE 4 (line 14) + | JSR L1 + | ALOAD 4 + | ATHROW + | L0: JSR L1 + | GOTO L2 + | L1: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L2: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/PatternWeaveHelloWorld.txt b/weaver/testdata/PatternWeaveHelloWorld.txt new file mode 100644 index 000000000..dfd6deff9 --- /dev/null +++ b/weaver/testdata/PatternWeaveHelloWorld.txt @@ -0,0 +1,22 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/PerSingletonField.txt b/weaver/testdata/PerSingletonField.txt new file mode 100644 index 000000000..4837c6569 --- /dev/null +++ b/weaver/testdata/PerSingletonField.txt @@ -0,0 +1,22 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + RETURN + end public void <init>() + + public static void main(String[]): + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + LDC "hello world" (line 9) + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + RETURN (line 11) + end public static void main(String[]) + + static void <clinit>(): + NEW HelloWorld + DUP + INVOKESPECIAL HelloWorld.<init> ()V + PUTSTATIC HelloWorld.ajc$perSingletonInstance LHelloWorld; + RETURN + end static void <clinit>() +end public class HelloWorld diff --git a/weaver/testdata/PerThisNonStaticBeforeFancyHelloWorld.txt b/weaver/testdata/PerThisNonStaticBeforeFancyHelloWorld.txt new file mode 100644 index 000000000..5155ab6d7 --- /dev/null +++ b/weaver/testdata/PerThisNonStaticBeforeFancyHelloWorld.txt @@ -0,0 +1,113 @@ +public abstract class FancyHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // FancyHelloWorld this (line 7) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void FancyHelloWorld.<init>()) + | RETURN + constructor-execution(void FancyHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void FancyHelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) + | field-get(java.io.PrintStream java.lang.System.out) + | ASTORE_1 + | finally -> E1 + | | catch java.lang.Exception -> E0 + | | | ALOAD_1 // java.io.PrintStream out (line 11) + | | | LDC "bye" + | | | ASTORE 5 + | | | ASTORE 6 + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | | ALOAD 6 + | | | | INVOKESTATIC Aspect.ajc$perObjectBind (Ljava/lang/Object;)V + | | | | ALOAD 6 + | | | | INVOKESTATIC Aspect.hasAspect (Ljava/lang/Object;)Z + | | | | IFEQ L0 + | | | | ALOAD 6 + | | | | INVOKESTATIC Aspect.aspectOf (Ljava/lang/Object;)LAspect; + | | | | INVOKEVIRTUAL Aspect.ajc_before ()V + | | | | L0: ALOAD 6 + | | | | ALOAD 5 + | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | | | method-call(void java.io.PrintStream.println(java.lang.String)) + | | | GOTO L2 + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) + | | ALOAD_1 // java.io.PrintStream out (line 13) + | | ALOAD_2 // java.lang.Exception e + | | ASTORE 7 + | | ASTORE 8 + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | | | ALOAD 8 + | | | INVOKESTATIC Aspect.ajc$perObjectBind (Ljava/lang/Object;)V + | | | ALOAD 8 + | | | INVOKESTATIC Aspect.hasAspect (Ljava/lang/Object;)Z + | | | IFEQ L1 + | | | ALOAD 8 + | | | INVOKESTATIC Aspect.aspectOf (Ljava/lang/Object;)LAspect; + | | | INVOKEVIRTUAL Aspect.ajc_before ()V + | | | L1: ALOAD 8 + | | | ALOAD 7 + | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V + | | method-call(void java.io.PrintStream.println(java.lang.Object)) + | finally -> E1 + | GOTO L2 + | E1: ASTORE 4 (line 14) + | JSR L3 + | ALOAD 4 + | ATHROW + | L2: JSR L3 + | GOTO L5 + | L3: ASTORE_3 + | ALOAD_1 // java.io.PrintStream out (line 15) + | LDC "finally" + | ASTORE 9 + | ASTORE 10 + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | ALOAD 10 + | | INVOKESTATIC Aspect.ajc$perObjectBind (Ljava/lang/Object;)V + | | ALOAD 10 + | | INVOKESTATIC Aspect.hasAspect (Ljava/lang/Object;)Z + | | IFEQ L4 + | | ALOAD 10 + | | INVOKESTATIC Aspect.aspectOf (Ljava/lang/Object;)LAspect; + | | INVOKEVIRTUAL Aspect.ajc_before ()V + | | L4: ALOAD 10 + | | ALOAD 9 + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RET 3 (line 10) + | L5: RETURN (line 17) + method-execution(void FancyHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + public static String getName(): + method-execution(java.lang.String FancyHelloWorld.getName()) + | ICONST_0 (line 20) + | ISTORE_0 + | ILOAD_0 // int x (line 21) + | LDC "name" + | method-call(int java.lang.String.hashCode()) + | | INVOKEVIRTUAL java.lang.String.hashCode ()I + | method-call(int java.lang.String.hashCode()) + | IADD + | ISTORE_0 // int x + | NEW java.lang.StringBuffer (line 22) + | DUP + | LDC "name" + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ILOAD_0 // int x + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (I)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(int)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | ARETURN + method-execution(java.lang.String FancyHelloWorld.getName()) + end public static String getName() +end public abstract class FancyHelloWorld diff --git a/weaver/testdata/PerThisNonStaticBeforeHelloWorld.txt b/weaver/testdata/PerThisNonStaticBeforeHelloWorld.txt new file mode 100644 index 000000000..7da847852 --- /dev/null +++ b/weaver/testdata/PerThisNonStaticBeforeHelloWorld.txt @@ -0,0 +1,34 @@ +public class HelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | ASTORE_1 + | ASTORE_2 + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | ALOAD_2 + | | INVOKESTATIC Aspect.ajc$perObjectBind (Ljava/lang/Object;)V + | | ALOAD_2 + | | INVOKESTATIC Aspect.hasAspect (Ljava/lang/Object;)Z + | | IFEQ L0 + | | ALOAD_2 + | | INVOKESTATIC Aspect.aspectOf (Ljava/lang/Object;)LAspect; + | | INVOKEVIRTUAL Aspect.ajc_before ()V + | | L0: ALOAD_2 + | | ALOAD_1 + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) +end public class HelloWorld diff --git a/weaver/testdata/Regex.jar b/weaver/testdata/Regex.jar Binary files differnew file mode 100644 index 000000000..713441c52 --- /dev/null +++ b/weaver/testdata/Regex.jar diff --git a/weaver/testdata/StateResidueMultiArgHelloWorld.txt b/weaver/testdata/StateResidueMultiArgHelloWorld.txt new file mode 100644 index 000000000..55cc92c3e --- /dev/null +++ b/weaver/testdata/StateResidueMultiArgHelloWorld.txt @@ -0,0 +1,62 @@ +public class MultiArgHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // MultiArgHelloWorld this (line 3) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void MultiArgHelloWorld.<init>()) + | RETURN + constructor-execution(void MultiArgHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void MultiArgHelloWorld.main(java.lang.String[])) + | LDC "Hello" (line 6) + | LDC "World" + | ASTORE_1 + | ASTORE_2 + | method-call(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | | ALOAD_2 + | | INSTANCEOF java.lang.String + | | IFEQ L0 + | | ALOAD_2 + | | CHECKCAST java.lang.String + | | INVOKESTATIC Aspect.ajc_before_0 (Ljava/lang/String;)V + | | L0: ALOAD_2 + | | ALOAD_1 + | | INVOKESTATIC MultiArgHelloWorld.foo (Ljava/lang/Object;Ljava/lang/Object;)V + | method-call(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | RETURN (line 7) + method-execution(void MultiArgHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static void foo(Object, Object): + method-execution(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 10) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | constructor-call(void java.lang.StringBuffer.<init>()) + | | INVOKESPECIAL java.lang.StringBuffer.<init> ()V + | constructor-call(void java.lang.StringBuffer.<init>()) + | ALOAD_0 // java.lang.Object arg0 + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | LDC " " + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.String)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/String;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.String)) + | ALOAD_1 // java.lang.Object t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + end static void foo(Object, Object) +end public class MultiArgHelloWorld diff --git a/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt b/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt new file mode 100644 index 000000000..6d9ed99f5 --- /dev/null +++ b/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt @@ -0,0 +1,61 @@ +public class HelloWorld extends java.lang.Object: + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | GETSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; + | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint$StaticPart;)V + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | GETSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint$StaticPart;)V + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + | | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint$StaticPart;)V + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | GETSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + | | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint$StaticPart;)V + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static void <clinit>(): + NEW org.aspectj.runtime.reflect.Factory + DUP + LDC "HelloWorld.java" + LDC "HelloWorld" + INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; + INVOKESPECIAL org.aspectj.runtime.reflect.Factory.<init> (Ljava/lang/String;Ljava/lang/Class;)V + ASTORE_0 + ALOAD_0 + LDC "constructor-execution" + ALOAD_0 + LDC "1--HelloWorld----" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeConstructorSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/ConstructorSignature; + BIPUSH 5 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "method-execution" + ALOAD_0 + LDC "9-main-HelloWorld-[Ljava/lang/String;:-args:--void-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature; + BIPUSH 8 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + staticinitialization(void HelloWorld.<clinit>()) + | RETURN + staticinitialization(void HelloWorld.<clinit>()) + end static void <clinit>() +end public class HelloWorld diff --git a/weaver/testdata/StaticTjpBeforeHelloWorld.txt b/weaver/testdata/StaticTjpBeforeHelloWorld.txt new file mode 100644 index 000000000..3c248872d --- /dev/null +++ b/weaver/testdata/StaticTjpBeforeHelloWorld.txt @@ -0,0 +1,79 @@ +public class HelloWorld extends java.lang.Object: + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void HelloWorld.<init>()) + | GETSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; + | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint$StaticPart;)V + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void HelloWorld.main(java.lang.String[])) + | GETSTATIC HelloWorld.ajc$tjp_3 Lorg/aspectj/lang/JoinPoint$StaticPart; + | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint$StaticPart;)V + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + | | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint$StaticPart;)V + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | GETSTATIC HelloWorld.ajc$tjp_2 Lorg/aspectj/lang/JoinPoint$StaticPart; + | | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint$StaticPart;)V + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static void <clinit>(): + NEW org.aspectj.runtime.reflect.Factory + DUP + LDC "HelloWorld.java" + LDC "HelloWorld" + INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; + INVOKESPECIAL org.aspectj.runtime.reflect.Factory.<init> (Ljava/lang/String;Ljava/lang/Class;)V + ASTORE_0 + ALOAD_0 + LDC "constructor-execution" + ALOAD_0 + LDC "1--HelloWorld----" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeConstructorSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/ConstructorSignature; + BIPUSH 5 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "field-get" + ALOAD_0 + LDC "19-out-java.lang.System-java.io.PrintStream-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeFieldSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/FieldSignature; + BIPUSH 8 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "method-call" + ALOAD_0 + LDC "1-println-java.io.PrintStream-java.lang.String:-arg0:--void-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature; + BIPUSH 9 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_2 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "method-execution" + ALOAD_0 + LDC "9-main-HelloWorld-[Ljava/lang/String;:-args:--void-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature; + BIPUSH 8 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_3 Lorg/aspectj/lang/JoinPoint$StaticPart; + staticinitialization(void HelloWorld.<clinit>()) + | RETURN + staticinitialization(void HelloWorld.<clinit>()) + end static void <clinit>() +end public class HelloWorld diff --git a/weaver/testdata/StringResidue1MultiArgHelloWorld.txt b/weaver/testdata/StringResidue1MultiArgHelloWorld.txt new file mode 100644 index 000000000..ff1add1d2 --- /dev/null +++ b/weaver/testdata/StringResidue1MultiArgHelloWorld.txt @@ -0,0 +1,63 @@ +public class MultiArgHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // MultiArgHelloWorld this (line 3) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void MultiArgHelloWorld.<init>()) + | RETURN + constructor-execution(void MultiArgHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void MultiArgHelloWorld.main(java.lang.String[])) + | LDC "Hello" (line 6) + | LDC "World" + | ASTORE_1 + | ASTORE_2 + | method-call(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | | ALOAD_2 + | | INSTANCEOF java.lang.String + | | IFEQ L0 + | | ALOAD_1 + | | INSTANCEOF java.lang.String + | | IFEQ L0 + | | INVOKESTATIC Aspect.ajc_before_0 ()V + | | L0: ALOAD_2 + | | ALOAD_1 + | | INVOKESTATIC MultiArgHelloWorld.foo (Ljava/lang/Object;Ljava/lang/Object;)V + | method-call(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | RETURN (line 7) + method-execution(void MultiArgHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static void foo(Object, Object): + method-execution(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 10) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | constructor-call(void java.lang.StringBuffer.<init>()) + | | INVOKESPECIAL java.lang.StringBuffer.<init> ()V + | constructor-call(void java.lang.StringBuffer.<init>()) + | ALOAD_0 // java.lang.Object arg0 + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | LDC " " + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.String)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/String;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.String)) + | ALOAD_1 // java.lang.Object t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + end static void foo(Object, Object) +end public class MultiArgHelloWorld diff --git a/weaver/testdata/StringResidue2MultiArgHelloWorld.txt b/weaver/testdata/StringResidue2MultiArgHelloWorld.txt new file mode 100644 index 000000000..8fb78655d --- /dev/null +++ b/weaver/testdata/StringResidue2MultiArgHelloWorld.txt @@ -0,0 +1,60 @@ +public class MultiArgHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // MultiArgHelloWorld this (line 3) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void MultiArgHelloWorld.<init>()) + | RETURN + constructor-execution(void MultiArgHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void MultiArgHelloWorld.main(java.lang.String[])) + | LDC "Hello" (line 6) + | LDC "World" + | ASTORE_1 + | ASTORE_2 + | method-call(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | | ALOAD_1 + | | INSTANCEOF java.lang.String + | | IFEQ L0 + | | INVOKESTATIC Aspect.ajc_before_0 ()V + | | L0: ALOAD_2 + | | ALOAD_1 + | | INVOKESTATIC MultiArgHelloWorld.foo (Ljava/lang/Object;Ljava/lang/Object;)V + | method-call(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | RETURN (line 7) + method-execution(void MultiArgHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static void foo(Object, Object): + method-execution(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 10) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | constructor-call(void java.lang.StringBuffer.<init>()) + | | INVOKESPECIAL java.lang.StringBuffer.<init> ()V + | constructor-call(void java.lang.StringBuffer.<init>()) + | ALOAD_0 // java.lang.Object arg0 + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | LDC " " + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.String)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/String;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.String)) + | ALOAD_1 // java.lang.Object t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + end static void foo(Object, Object) +end public class MultiArgHelloWorld diff --git a/weaver/testdata/StringResidue3MultiArgHelloWorld.txt b/weaver/testdata/StringResidue3MultiArgHelloWorld.txt new file mode 100644 index 000000000..6c361581f --- /dev/null +++ b/weaver/testdata/StringResidue3MultiArgHelloWorld.txt @@ -0,0 +1,60 @@ +public class MultiArgHelloWorld extends java.lang.Object: + public void <init>(): + ALOAD_0 // MultiArgHelloWorld this (line 3) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void MultiArgHelloWorld.<init>()) + | RETURN + constructor-execution(void MultiArgHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void MultiArgHelloWorld.main(java.lang.String[])) + | LDC "Hello" (line 6) + | LDC "World" + | ASTORE_1 + | ASTORE_2 + | method-call(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | | ALOAD_2 + | | INSTANCEOF java.lang.String + | | IFEQ L0 + | | INVOKESTATIC Aspect.ajc_before_0 ()V + | | L0: ALOAD_2 + | | ALOAD_1 + | | INVOKESTATIC MultiArgHelloWorld.foo (Ljava/lang/Object;Ljava/lang/Object;)V + | method-call(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | RETURN (line 7) + method-execution(void MultiArgHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static void foo(Object, Object): + method-execution(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 10) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | constructor-call(void java.lang.StringBuffer.<init>()) + | | INVOKESPECIAL java.lang.StringBuffer.<init> ()V + | constructor-call(void java.lang.StringBuffer.<init>()) + | ALOAD_0 // java.lang.Object arg0 + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | LDC " " + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.String)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/String;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.String)) + | ALOAD_1 // java.lang.Object t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void MultiArgHelloWorld.foo(java.lang.Object, java.lang.Object)) + end static void foo(Object, Object) +end public class MultiArgHelloWorld diff --git a/weaver/testdata/TjpAround2HelloWorld.txt b/weaver/testdata/TjpAround2HelloWorld.txt new file mode 100644 index 000000000..8f4b4dea4 --- /dev/null +++ b/weaver/testdata/TjpAround2HelloWorld.txt @@ -0,0 +1,503 @@ +public class HelloWorld extends java.lang.Object: + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + GETSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + ALOAD_0 + BIPUSH 0 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + ASTORE_1 + constructor-execution(void HelloWorld.<init>()) + | BIPUSH 2 + | ANEWARRAY java.lang.Object + | ASTORE 4 + | ALOAD 4 + | BIPUSH 0 + | ALOAD_0 + | AASTORE + | ALOAD 4 + | BIPUSH 1 + | ALOAD_1 + | AASTORE + | NEW HelloWorld$AjcClosure3 + | DUP + | ALOAD 4 + | INVOKESPECIAL HelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V + | ALOAD_1 + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + | POP + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE 11 + GETSTATIC HelloWorld.ajc$tjp_3 Lorg/aspectj/lang/JoinPoint$StaticPart; + ACONST_NULL + ACONST_NULL + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE 13 + ALOAD 13 + BIPUSH 0 + ALOAD 11 + AASTORE + ALOAD 13 + INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + ASTORE 12 + method-execution(void HelloWorld.main(java.lang.String[])) + | BIPUSH 2 + | ANEWARRAY java.lang.Object + | ASTORE 15 + | ALOAD 15 + | BIPUSH 0 + | ALOAD 11 + | AASTORE + | ALOAD 15 + | BIPUSH 1 + | ALOAD 12 + | AASTORE + | NEW HelloWorld$AjcClosure15 + | DUP + | ALOAD 15 + | INVOKESPECIAL HelloWorld$AjcClosure15.<init> ([Ljava/lang/Object;)V + | ALOAD 12 + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + | POP + | RETURN + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static void <clinit>(): + NEW org.aspectj.runtime.reflect.Factory + DUP + LDC "HelloWorld.java" + LDC "HelloWorld" + INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; + INVOKESPECIAL org.aspectj.runtime.reflect.Factory.<init> (Ljava/lang/String;Ljava/lang/Class;)V + ASTORE_0 + ALOAD_0 + LDC "constructor-execution" + ALOAD_0 + LDC "1--HelloWorld----" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeConstructorSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/ConstructorSignature; + BIPUSH 5 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "field-get" + ALOAD_0 + LDC "19-out-java.lang.System-java.io.PrintStream-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeFieldSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/FieldSignature; + BIPUSH 8 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "method-call" + ALOAD_0 + LDC "1-println-java.io.PrintStream-java.lang.String:-arg0:--void-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature; + BIPUSH 9 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_2 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "method-execution" + ALOAD_0 + LDC "9-main-HelloWorld-[Ljava/lang/String;:-args:--void-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature; + BIPUSH 8 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_3 Lorg/aspectj/lang/JoinPoint$StaticPart; + staticinitialization(void HelloWorld.<clinit>()) + | RETURN + staticinitialization(void HelloWorld.<clinit>()) + end static void <clinit>() + + static final void init$_aroundBody0(HelloWorld, org.aspectj.lang.JoinPoint): + RETURN (line 5) + end static final void init$_aroundBody0(HelloWorld, org.aspectj.lang.JoinPoint) + + static final void init$_aroundBody2(HelloWorld, org.aspectj.lang.JoinPoint): + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ALOAD_1 + AASTORE + NEW HelloWorld$AjcClosure1 + DUP + ALOAD_2 + INVOKESPECIAL HelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + ALOAD_1 + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + POP + RETURN + end static final void init$_aroundBody2(HelloWorld, org.aspectj.lang.JoinPoint) + + static final java.io.PrintStream out_aroundBody4(org.aspectj.lang.JoinPoint): + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + ARETURN + end static final java.io.PrintStream out_aroundBody4(org.aspectj.lang.JoinPoint) + + static final java.io.PrintStream out_aroundBody6(org.aspectj.lang.JoinPoint): + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE_1 + ALOAD_1 + BIPUSH 0 + ALOAD_0 + AASTORE + NEW HelloWorld$AjcClosure5 + DUP + ALOAD_1 + INVOKESPECIAL HelloWorld$AjcClosure5.<init> ([Ljava/lang/Object;)V + ALOAD_0 + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + CHECKCAST java.io.PrintStream + ARETURN + end static final java.io.PrintStream out_aroundBody6(org.aspectj.lang.JoinPoint) + + static final void println_aroundBody8(java.io.PrintStream, String, org.aspectj.lang.JoinPoint): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 9) + RETURN + end static final void println_aroundBody8(java.io.PrintStream, String, org.aspectj.lang.JoinPoint) + + static final void println_aroundBody10(java.io.PrintStream, String, org.aspectj.lang.JoinPoint): + BIPUSH 3 + ANEWARRAY java.lang.Object + ASTORE_3 + ALOAD_3 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_3 + BIPUSH 1 + ALOAD_1 + AASTORE + ALOAD_3 + BIPUSH 2 + ALOAD_2 + AASTORE + NEW HelloWorld$AjcClosure9 + DUP + ALOAD_3 + INVOKESPECIAL HelloWorld$AjcClosure9.<init> ([Ljava/lang/Object;)V + ALOAD_2 + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + POP + RETURN + end static final void println_aroundBody10(java.io.PrintStream, String, org.aspectj.lang.JoinPoint) + + static final void main_aroundBody12(String[], org.aspectj.lang.JoinPoint): + GETSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + ACONST_NULL + ACONST_NULL + BIPUSH 0 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + ASTORE 4 + field-get(java.io.PrintStream java.lang.System.out) + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 6 + | ALOAD 6 + | BIPUSH 0 + | ALOAD 4 + | AASTORE + | NEW HelloWorld$AjcClosure7 + | DUP + | ALOAD 6 + | INVOKESPECIAL HelloWorld$AjcClosure7.<init> ([Ljava/lang/Object;)V + | ALOAD 4 + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + | CHECKCAST java.io.PrintStream + field-get(java.io.PrintStream java.lang.System.out) + LDC "hello world" (line 9) + ASTORE 8 + ASTORE 10 + GETSTATIC HelloWorld.ajc$tjp_2 Lorg/aspectj/lang/JoinPoint$StaticPart; + ACONST_NULL + ALOAD 10 + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE 12 + ALOAD 12 + BIPUSH 0 + ALOAD 8 + AASTORE + ALOAD 12 + INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + ASTORE 14 + method-call(void java.io.PrintStream.println(java.lang.String)) + | BIPUSH 3 + | ANEWARRAY java.lang.Object + | ASTORE 16 + | ALOAD 16 + | BIPUSH 0 + | ALOAD 10 + | AASTORE + | ALOAD 16 + | BIPUSH 1 + | ALOAD 8 + | AASTORE + | ALOAD 16 + | BIPUSH 2 + | ALOAD 14 + | AASTORE + | NEW HelloWorld$AjcClosure11 + | DUP + | ALOAD 16 + | INVOKESPECIAL HelloWorld$AjcClosure11.<init> ([Ljava/lang/Object;)V + | ALOAD 14 + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + | POP + method-call(void java.io.PrintStream.println(java.lang.String)) + RETURN (line 11) + end static final void main_aroundBody12(String[], org.aspectj.lang.JoinPoint) + + static final void main_aroundBody14(String[], org.aspectj.lang.JoinPoint): + BIPUSH 2 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_2 + BIPUSH 1 + ALOAD_1 + AASTORE + NEW HelloWorld$AjcClosure13 + DUP + ALOAD_2 + INVOKESPECIAL HelloWorld$AjcClosure13.<init> ([Ljava/lang/Object;)V + ALOAD_1 + INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + POP + RETURN + end static final void main_aroundBody14(String[], org.aspectj.lang.JoinPoint) +end public class HelloWorld + +public class HelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST HelloWorld + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.init$_aroundBody0 (LHelloWorld;Lorg/aspectj/lang/JoinPoint;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure1 + +public class HelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST HelloWorld + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.init$_aroundBody2 (LHelloWorld;Lorg/aspectj/lang/JoinPoint;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure3 + +public class HelloWorld$AjcClosure5 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.out_aroundBody4 (Lorg/aspectj/lang/JoinPoint;)Ljava/io/PrintStream; + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure5 + +public class HelloWorld$AjcClosure7 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.out_aroundBody6 (Lorg/aspectj/lang/JoinPoint;)Ljava/io/PrintStream; + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure7 + +public class HelloWorld$AjcClosure9 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + ALOAD_2 + BIPUSH 2 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.println_aroundBody8 (Ljava/io/PrintStream;Ljava/lang/String;Lorg/aspectj/lang/JoinPoint;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure9 + +public class HelloWorld$AjcClosure11 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + ALOAD_2 + BIPUSH 2 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.println_aroundBody10 (Ljava/io/PrintStream;Ljava/lang/String;Lorg/aspectj/lang/JoinPoint;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure11 + +public class HelloWorld$AjcClosure13 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST [Ljava.lang.String; + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.main_aroundBody12 ([Ljava/lang/String;Lorg/aspectj/lang/JoinPoint;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure13 + +public class HelloWorld$AjcClosure15 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST [Ljava.lang.String; + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.main_aroundBody14 ([Ljava/lang/String;Lorg/aspectj/lang/JoinPoint;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure15 diff --git a/weaver/testdata/TjpAroundHelloWorld.txt b/weaver/testdata/TjpAroundHelloWorld.txt new file mode 100644 index 000000000..d1424058e --- /dev/null +++ b/weaver/testdata/TjpAroundHelloWorld.txt @@ -0,0 +1,312 @@ +public class HelloWorld extends java.lang.Object: + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + GETSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + ALOAD_0 + BIPUSH 0 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + ASTORE_1 + constructor-execution(void HelloWorld.<init>()) + | BIPUSH 2 + | ANEWARRAY java.lang.Object + | ASTORE_3 + | ALOAD_3 + | BIPUSH 0 + | ALOAD_0 + | AASTORE + | ALOAD_3 + | BIPUSH 1 + | ALOAD_1 + | AASTORE + | NEW HelloWorld$AjcClosure1 + | DUP + | ALOAD_3 + | INVOKESPECIAL HelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + | ALOAD_1 + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + | POP + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE 9 + GETSTATIC HelloWorld.ajc$tjp_3 Lorg/aspectj/lang/JoinPoint$StaticPart; + ACONST_NULL + ACONST_NULL + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE 11 + ALOAD 11 + BIPUSH 0 + ALOAD 9 + AASTORE + ALOAD 11 + INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + ASTORE 10 + method-execution(void HelloWorld.main(java.lang.String[])) + | BIPUSH 2 + | ANEWARRAY java.lang.Object + | ASTORE 12 + | ALOAD 12 + | BIPUSH 0 + | ALOAD 9 + | AASTORE + | ALOAD 12 + | BIPUSH 1 + | ALOAD 10 + | AASTORE + | NEW HelloWorld$AjcClosure7 + | DUP + | ALOAD 12 + | INVOKESPECIAL HelloWorld$AjcClosure7.<init> ([Ljava/lang/Object;)V + | ALOAD 10 + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + | POP + | RETURN + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static void <clinit>(): + NEW org.aspectj.runtime.reflect.Factory + DUP + LDC "HelloWorld.java" + LDC "HelloWorld" + INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; + INVOKESPECIAL org.aspectj.runtime.reflect.Factory.<init> (Ljava/lang/String;Ljava/lang/Class;)V + ASTORE_0 + ALOAD_0 + LDC "constructor-execution" + ALOAD_0 + LDC "1--HelloWorld----" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeConstructorSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/ConstructorSignature; + BIPUSH 5 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "field-get" + ALOAD_0 + LDC "19-out-java.lang.System-java.io.PrintStream-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeFieldSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/FieldSignature; + BIPUSH 8 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "method-call" + ALOAD_0 + LDC "1-println-java.io.PrintStream-java.lang.String:-arg0:--void-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature; + BIPUSH 9 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_2 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "method-execution" + ALOAD_0 + LDC "9-main-HelloWorld-[Ljava/lang/String;:-args:--void-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature; + BIPUSH 8 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_3 Lorg/aspectj/lang/JoinPoint$StaticPart; + staticinitialization(void HelloWorld.<clinit>()) + | RETURN + staticinitialization(void HelloWorld.<clinit>()) + end static void <clinit>() + + static final void init$_aroundBody0(HelloWorld, org.aspectj.lang.JoinPoint): + RETURN (line 5) + end static final void init$_aroundBody0(HelloWorld, org.aspectj.lang.JoinPoint) + + static final java.io.PrintStream out_aroundBody2(org.aspectj.lang.JoinPoint): + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + ARETURN + end static final java.io.PrintStream out_aroundBody2(org.aspectj.lang.JoinPoint) + + static final void println_aroundBody4(java.io.PrintStream, String, org.aspectj.lang.JoinPoint): + ALOAD_0 + ALOAD_1 + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V (line 9) + RETURN + end static final void println_aroundBody4(java.io.PrintStream, String, org.aspectj.lang.JoinPoint) + + static final void main_aroundBody6(String[], org.aspectj.lang.JoinPoint): + GETSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + ACONST_NULL + ACONST_NULL + BIPUSH 0 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + ASTORE 4 + field-get(java.io.PrintStream java.lang.System.out) + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 6 + | ALOAD 6 + | BIPUSH 0 + | ALOAD 4 + | AASTORE + | NEW HelloWorld$AjcClosure3 + | DUP + | ALOAD 6 + | INVOKESPECIAL HelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V + | ALOAD 4 + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + | CHECKCAST java.io.PrintStream + field-get(java.io.PrintStream java.lang.System.out) + LDC "hello world" (line 9) + ASTORE 8 + ASTORE 10 + GETSTATIC HelloWorld.ajc$tjp_2 Lorg/aspectj/lang/JoinPoint$StaticPart; + ACONST_NULL + ALOAD 10 + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE 12 + ALOAD 12 + BIPUSH 0 + ALOAD 8 + AASTORE + ALOAD 12 + INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + ASTORE 14 + method-call(void java.io.PrintStream.println(java.lang.String)) + | BIPUSH 3 + | ANEWARRAY java.lang.Object + | ASTORE 16 + | ALOAD 16 + | BIPUSH 0 + | ALOAD 10 + | AASTORE + | ALOAD 16 + | BIPUSH 1 + | ALOAD 8 + | AASTORE + | ALOAD 16 + | BIPUSH 2 + | ALOAD 14 + | AASTORE + | NEW HelloWorld$AjcClosure5 + | DUP + | ALOAD 16 + | INVOKESPECIAL HelloWorld$AjcClosure5.<init> ([Ljava/lang/Object;)V + | ALOAD 14 + | INVOKESTATIC Aspect.ajc_around (Lorg/aspectj/runtime/internal/AroundClosure;Lorg/aspectj/lang/JoinPoint;)Ljava/lang/Object; + | POP + method-call(void java.io.PrintStream.println(java.lang.String)) + RETURN (line 11) + end static final void main_aroundBody6(String[], org.aspectj.lang.JoinPoint) +end public class HelloWorld + +public class HelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST HelloWorld + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.init$_aroundBody0 (LHelloWorld;Lorg/aspectj/lang/JoinPoint;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure1 + +public class HelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.out_aroundBody2 (Lorg/aspectj/lang/JoinPoint;)Ljava/io/PrintStream; + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure3 + +public class HelloWorld$AjcClosure5 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST java.io.PrintStream + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + ALOAD_2 + BIPUSH 2 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.println_aroundBody4 (Ljava/io/PrintStream;Ljava/lang/String;Lorg/aspectj/lang/JoinPoint;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure5 + +public class HelloWorld$AjcClosure7 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST [Ljava.lang.String; + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST org.aspectj.lang.JoinPoint + INVOKESTATIC HelloWorld.main_aroundBody6 ([Ljava/lang/String;Lorg/aspectj/lang/JoinPoint;)V + ACONST_NULL + ARETURN + end public Object run(Object[]) +end public class HelloWorld$AjcClosure7 diff --git a/weaver/testdata/TjpBeforeHelloWorld.txt b/weaver/testdata/TjpBeforeHelloWorld.txt new file mode 100644 index 000000000..b63dde298 --- /dev/null +++ b/weaver/testdata/TjpBeforeHelloWorld.txt @@ -0,0 +1,129 @@ +public class HelloWorld extends java.lang.Object: + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 + public static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 + public void <init>(): + ALOAD_0 // HelloWorld this (line 5) + INVOKESPECIAL java.lang.Object.<init> ()V + GETSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + ALOAD_0 + BIPUSH 0 + ANEWARRAY java.lang.Object + ASTORE_2 + ALOAD_2 + INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + ASTORE_1 + constructor-execution(void HelloWorld.<init>()) + | ALOAD_1 + | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint;)V + | RETURN + constructor-execution(void HelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + ALOAD_0 + ASTORE 9 + GETSTATIC HelloWorld.ajc$tjp_3 Lorg/aspectj/lang/JoinPoint$StaticPart; + ACONST_NULL + ACONST_NULL + BIPUSH 1 + ANEWARRAY java.lang.Object + ASTORE 8 + ALOAD 8 + BIPUSH 0 + ALOAD 9 + AASTORE + ALOAD 8 + INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + ASTORE 7 + method-execution(void HelloWorld.main(java.lang.String[])) + | ALOAD 7 + | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint;)V + | GETSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + | ACONST_NULL + | ACONST_NULL + | BIPUSH 0 + | ANEWARRAY java.lang.Object + | ASTORE_2 + | ALOAD_2 + | INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + | ASTORE_1 + | field-get(java.io.PrintStream java.lang.System.out) + | | ALOAD_1 + | | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint;)V + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 8) + | field-get(java.io.PrintStream java.lang.System.out) + | LDC "hello world" (line 9) + | ASTORE 4 + | ASTORE 5 + | GETSTATIC HelloWorld.ajc$tjp_2 Lorg/aspectj/lang/JoinPoint$StaticPart; + | ACONST_NULL + | ALOAD 5 + | BIPUSH 1 + | ANEWARRAY java.lang.Object + | ASTORE 6 + | ALOAD 6 + | BIPUSH 0 + | ALOAD 4 + | AASTORE + | ALOAD 6 + | INVOKESTATIC org.aspectj.runtime.reflect.Factory.makeJP (Lorg/aspectj/lang/JoinPoint$StaticPart;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lorg/aspectj/lang/JoinPoint; + | ASTORE_3 + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | ALOAD_3 + | | INVOKESTATIC Aspect.ajc_before (Lorg/aspectj/lang/JoinPoint;)V + | | ALOAD 5 + | | ALOAD 4 + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 11) + method-execution(void HelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + static void <clinit>(): + NEW org.aspectj.runtime.reflect.Factory + DUP + LDC "HelloWorld.java" + LDC "HelloWorld" + INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class; + INVOKESPECIAL org.aspectj.runtime.reflect.Factory.<init> (Ljava/lang/String;Ljava/lang/Class;)V + ASTORE_0 + ALOAD_0 + LDC "constructor-execution" + ALOAD_0 + LDC "1--HelloWorld----" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeConstructorSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/ConstructorSignature; + BIPUSH 5 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "field-get" + ALOAD_0 + LDC "19-out-java.lang.System-java.io.PrintStream-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeFieldSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/FieldSignature; + BIPUSH 8 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "method-call" + ALOAD_0 + LDC "1-println-java.io.PrintStream-java.lang.String:-arg0:--void-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature; + BIPUSH 9 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_2 Lorg/aspectj/lang/JoinPoint$StaticPart; + ALOAD_0 + LDC "method-execution" + ALOAD_0 + LDC "9-main-HelloWorld-[Ljava/lang/String;:-args:--void-" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature; + BIPUSH 8 + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeSJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$StaticPart; + PUTSTATIC HelloWorld.ajc$tjp_3 Lorg/aspectj/lang/JoinPoint$StaticPart; + staticinitialization(void HelloWorld.<clinit>()) + | RETURN + staticinitialization(void HelloWorld.<clinit>()) + end static void <clinit>() +end public class HelloWorld diff --git a/weaver/testdata/TraceJarHello.txt b/weaver/testdata/TraceJarHello.txt new file mode 100644 index 000000000..0741a7ac1 --- /dev/null +++ b/weaver/testdata/TraceJarHello.txt @@ -0,0 +1,199 @@ +public class DynamicHelloWorld extends java.lang.Object implements java.io.Serializable: + public void <init>(): + ALOAD_0 // DynamicHelloWorld this (line 8) + INVOKESPECIAL java.lang.Object.<init> ()V + constructor-execution(void DynamicHelloWorld.<init>()) + | RETURN + constructor-execution(void DynamicHelloWorld.<init>()) + end public void <init>() + + public static void main(String[]): + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + | catch java.lang.UnsupportedOperationException -> E0 + | | NEW DynamicHelloWorld (line 12) + | | DUP + | | constructor-call(void DynamicHelloWorld.<init>()) + | | | INVOKESPECIAL DynamicHelloWorld.<init> ()V + | | constructor-call(void DynamicHelloWorld.<init>()) + | | LDC "hello" + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | | GETSTATIC java.util.Collections.EMPTY_LIST Ljava/util/List; + | | field-get(java.util.List java.util.Collections.EMPTY_LIST) + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | | INVOKEVIRTUAL DynamicHelloWorld.doit (Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + | | method-call(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | | POP + | | GOTO L0 + | catch java.lang.UnsupportedOperationException -> E0 + | E0: ASTORE_1 (line 13) + | field-get(java.io.PrintStream java.lang.System.out) + | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 14) + | field-get(java.io.PrintStream java.lang.System.out) + | NEW java.lang.StringBuffer + | DUP + | LDC "expected and caught: " + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.StringBuffer.<init>(java.lang.String)) + | ALOAD_1 // java.lang.UnsupportedOperationException t + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | method-call(java.lang.StringBuffer java.lang.StringBuffer.append(java.lang.Object)) + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | method-call(java.lang.String java.lang.StringBuffer.toString()) + | method-call(void java.io.PrintStream.println(java.lang.String)) + | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | method-call(void java.io.PrintStream.println(java.lang.String)) + | RETURN (line 15) + | L0: NEW java.lang.RuntimeException (line 17) + | DUP + | LDC "should have caught exception" + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | | INVOKESPECIAL java.lang.RuntimeException.<init> (Ljava/lang/String;)V + | constructor-call(void java.lang.RuntimeException.<init>(java.lang.String)) + | ATHROW + method-execution(void DynamicHelloWorld.main(java.lang.String[])) + end public static void main(String[]) + + String doit(String, java.util.List): + ALOAD_1 + ASTORE_3 + ALOAD_2 + ASTORE 4 + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + | GETSTATIC MyTrace.ajc$perSingletonInstance LMyTrace; + | ALOAD_0 + | INVOKEVIRTUAL Trace.ajc$before$Trace$51 (Ljava/lang/Object;)V + | GETSTATIC MyTrace.ajc$perSingletonInstance LMyTrace; + | BIPUSH 3 + | ANEWARRAY java.lang.Object + | ASTORE 6 + | ALOAD 6 + | BIPUSH 0 + | ALOAD_0 + | AASTORE + | ALOAD 6 + | BIPUSH 1 + | ALOAD_3 + | AASTORE + | ALOAD 6 + | BIPUSH 2 + | ALOAD 4 + | AASTORE + | NEW DynamicHelloWorld$AjcClosure3 + | DUP + | ALOAD 6 + | INVOKESPECIAL DynamicHelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V + | INVOKEVIRTUAL Trace.ajc$around$Trace$cc (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + | CHECKCAST java.lang.String + | GOTO L0 + | L0: DUP + | ASTORE 7 + | GETSTATIC MyTrace.ajc$perSingletonInstance LMyTrace; + | ALOAD_0 + | ALOAD 7 + | INVOKEVIRTUAL MyTrace.ajc$afterReturning$MyTrace$6e (Ljava/lang/Object;Ljava/lang/Object;)V + | ARETURN + method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) + end String doit(String, java.util.List) + + static final String doit_aroundBody0(DynamicHelloWorld, String, java.util.List): + ALOAD_2 (line 21) + ALOAD_1 + method-call(boolean java.util.List.add(java.lang.Object)) + | INVOKEINTERFACE java.util.List.add (Ljava/lang/Object;)Z + method-call(boolean java.util.List.add(java.lang.Object)) + POP + ALOAD_2 (line 22) + method-call(java.lang.String java.lang.Object.toString()) + | INVOKEVIRTUAL java.lang.Object.toString ()Ljava/lang/String; + method-call(java.lang.String java.lang.Object.toString()) + ARETURN + end static final String doit_aroundBody0(DynamicHelloWorld, String, java.util.List) + + static final String doit_aroundBody2(DynamicHelloWorld, String, java.util.List): + GETSTATIC MyTrace.ajc$perSingletonInstance LMyTrace; + ALOAD_0 + BIPUSH 3 + ANEWARRAY java.lang.Object + ASTORE_3 + ALOAD_3 + BIPUSH 0 + ALOAD_0 + AASTORE + ALOAD_3 + BIPUSH 1 + ALOAD_1 + AASTORE + ALOAD_3 + BIPUSH 2 + ALOAD_2 + AASTORE + NEW DynamicHelloWorld$AjcClosure1 + DUP + ALOAD_3 + INVOKESPECIAL DynamicHelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V + INVOKEVIRTUAL Trace.ajc$around$Trace$1bc (Ljava/lang/Object;Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; + CHECKCAST java.lang.String + ARETURN + end static final String doit_aroundBody2(DynamicHelloWorld, String, java.util.List) +end public class DynamicHelloWorld + +public class DynamicHelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_1 + BIPUSH 0 + AALOAD + CHECKCAST DynamicHelloWorld + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + ALOAD_2 + BIPUSH 2 + AALOAD + CHECKCAST java.util.List + INVOKESTATIC DynamicHelloWorld.doit_aroundBody0 (LDynamicHelloWorld;Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + ARETURN + end public Object run(Object[]) +end public class DynamicHelloWorld$AjcClosure1 + +public class DynamicHelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: + public void <init>(Object[]): + ALOAD_0 + ALOAD_1 + INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V + RETURN + end public void <init>(Object[]) + + public Object run(Object[]): + ALOAD_0 + GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; + ASTORE_2 + ALOAD_2 + BIPUSH 0 + AALOAD + CHECKCAST DynamicHelloWorld + ALOAD_2 + BIPUSH 1 + AALOAD + CHECKCAST java.lang.String + ALOAD_2 + BIPUSH 2 + AALOAD + CHECKCAST java.util.List + INVOKESTATIC DynamicHelloWorld.doit_aroundBody2 (LDynamicHelloWorld;Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + ARETURN + end public Object run(Object[]) +end public class DynamicHelloWorld$AjcClosure3 diff --git a/weaver/testdata/aspectjtools.jar b/weaver/testdata/aspectjtools.jar Binary files differnew file mode 100644 index 000000000..b75dfa0ee --- /dev/null +++ b/weaver/testdata/aspectjtools.jar diff --git a/weaver/testdata/dummyAspect.jar b/weaver/testdata/dummyAspect.jar Binary files differnew file mode 100644 index 000000000..d43326ab1 --- /dev/null +++ b/weaver/testdata/dummyAspect.jar diff --git a/weaver/testdata/megatrace.jar b/weaver/testdata/megatrace.jar Binary files differnew file mode 100644 index 000000000..cd9a39fde --- /dev/null +++ b/weaver/testdata/megatrace.jar diff --git a/weaver/testdata/megatraceNoweave.jar b/weaver/testdata/megatraceNoweave.jar Binary files differnew file mode 100644 index 000000000..ec73b528a --- /dev/null +++ b/weaver/testdata/megatraceNoweave.jar diff --git a/weaver/testdata/tracing.jar b/weaver/testdata/tracing.jar Binary files differnew file mode 100644 index 000000000..b43613e79 --- /dev/null +++ b/weaver/testdata/tracing.jar |