diff options
author | aclement <aclement> | 2010-05-13 04:06:11 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-05-13 04:06:11 +0000 |
commit | 27fa7e935696eda000b944d163ce1f3c4fa5afa5 (patch) | |
tree | eac9f11eaa652bede052beef2684b387cf71bbc8 /weaver | |
parent | 8764d5f36d7acb2c2af4051accac4f9c1b7e830d (diff) | |
download | aspectj-27fa7e935696eda000b944d163ce1f3c4fa5afa5.tar.gz aspectj-27fa7e935696eda000b944d163ce1f3c4fa5afa5.zip |
more overweaving tests and fixes: method call/field get/set
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt | 13 | ||||
-rw-r--r-- | weaver/testdata/StaticTjpBeforeHelloWorld.txt | 13 | ||||
-rw-r--r-- | weaver/testdata/TjpAround2HelloWorld.txt | 123 | ||||
-rw-r--r-- | weaver/testdata/TjpAroundHelloWorld.txt | 123 | ||||
-rw-r--r-- | weaver/testdata/TjpBeforeHelloWorld.txt | 13 |
5 files changed, 155 insertions, 130 deletions
diff --git a/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt b/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt index 0db61ae96..c9efdf94a 100644 --- a/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt +++ b/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt @@ -31,6 +31,13 @@ public class HelloWorld extends java.lang.Object: end public static void main(String[]) static void <clinit>(): + INVOKESTATIC HelloWorld.ajc$preClinit ()V + staticinitialization(void HelloWorld.<clinit>()) + | RETURN + staticinitialization(void HelloWorld.<clinit>()) + end static void <clinit>() + + private static void ajc$preClinit(): NEW org.aspectj.runtime.reflect.Factory DUP LDC "HelloWorld.java" @@ -64,8 +71,6 @@ public class HelloWorld extends java.lang.Object: BIPUSH 8 INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeESJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$EnclosingStaticPart; PUTSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$EnclosingStaticPart; - staticinitialization(void HelloWorld.<clinit>()) - | RETURN - staticinitialization(void HelloWorld.<clinit>()) - end static void <clinit>() + RETURN + end private static void ajc$preClinit() end public class HelloWorld diff --git a/weaver/testdata/StaticTjpBeforeHelloWorld.txt b/weaver/testdata/StaticTjpBeforeHelloWorld.txt index e5ecb63f3..419571043 100644 --- a/weaver/testdata/StaticTjpBeforeHelloWorld.txt +++ b/weaver/testdata/StaticTjpBeforeHelloWorld.txt @@ -33,6 +33,13 @@ public class HelloWorld extends java.lang.Object: end public static void main(String[]) static void <clinit>(): + INVOKESTATIC HelloWorld.ajc$preClinit ()V + staticinitialization(void HelloWorld.<clinit>()) + | RETURN + staticinitialization(void HelloWorld.<clinit>()) + end static void <clinit>() + + private static void ajc$preClinit(): NEW org.aspectj.runtime.reflect.Factory DUP LDC "HelloWorld.java" @@ -91,8 +98,6 @@ public class HelloWorld extends java.lang.Object: 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>() + RETURN + end private static void ajc$preClinit() end public class HelloWorld diff --git a/weaver/testdata/TjpAround2HelloWorld.txt b/weaver/testdata/TjpAround2HelloWorld.txt index 2e10054fc..4d29b07c4 100644 --- a/weaver/testdata/TjpAround2HelloWorld.txt +++ b/weaver/testdata/TjpAround2HelloWorld.txt @@ -4,7 +4,7 @@ public class HelloWorld extends java.lang.Object: private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic] private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic] public void <init>(): - ALOAD_0 // LHelloWorld; this (line 5) + ALOAD_0 // LHelloWorld; ajc$this (line 5) INVOKESPECIAL java.lang.Object.<init> ()V GETSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; ALOAD_0 @@ -67,64 +67,7 @@ public class HelloWorld extends java.lang.Object: 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" - LDC "HelloWorld" - LDC "" - LDC "" - LDC "" - INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeConstructorSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/ConstructorSignature; - ICONST_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" - LDC "out" - LDC "java.lang.System" - LDC "java.io.PrintStream" - INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeFieldSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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" - LDC "println" - LDC "java.io.PrintStream" - LDC "java.lang.String:" - LDC "arg0:" - LDC "" - LDC "void" - INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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" - LDC "main" - LDC "HelloWorld" - LDC "[Ljava.lang.String;:" - LDC "args:" - LDC "" - LDC "void" - INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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; + INVOKESTATIC HelloWorld.ajc$preClinit ()V staticinitialization(void HelloWorld.<clinit>()) | RETURN staticinitialization(void HelloWorld.<clinit>()) @@ -291,6 +234,68 @@ public class HelloWorld extends java.lang.Object: POP RETURN end static final void main_aroundBody14(String[], org.aspectj.lang.JoinPoint) + + private static void ajc$preClinit(): + 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" + LDC "HelloWorld" + LDC "" + LDC "" + LDC "" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeConstructorSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/ConstructorSignature; + ICONST_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" + LDC "out" + LDC "java.lang.System" + LDC "java.io.PrintStream" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeFieldSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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" + LDC "println" + LDC "java.io.PrintStream" + LDC "java.lang.String:" + LDC "arg0:" + LDC "" + LDC "void" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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" + LDC "main" + LDC "HelloWorld" + LDC "[Ljava.lang.String;:" + LDC "args:" + LDC "" + LDC "void" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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; + RETURN + end private static void ajc$preClinit() end public class HelloWorld public class HelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: diff --git a/weaver/testdata/TjpAroundHelloWorld.txt b/weaver/testdata/TjpAroundHelloWorld.txt index 2a32f83f6..18b6e7572 100644 --- a/weaver/testdata/TjpAroundHelloWorld.txt +++ b/weaver/testdata/TjpAroundHelloWorld.txt @@ -4,7 +4,7 @@ public class HelloWorld extends java.lang.Object: private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic] private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic] public void <init>(): - ALOAD_0 // LHelloWorld; this (line 5) + ALOAD_0 // LHelloWorld; ajc$this (line 5) INVOKESPECIAL java.lang.Object.<init> ()V GETSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$StaticPart; ALOAD_0 @@ -67,64 +67,7 @@ public class HelloWorld extends java.lang.Object: 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" - LDC "HelloWorld" - LDC "" - LDC "" - LDC "" - INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeConstructorSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/ConstructorSignature; - ICONST_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" - LDC "out" - LDC "java.lang.System" - LDC "java.io.PrintStream" - INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeFieldSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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" - LDC "println" - LDC "java.io.PrintStream" - LDC "java.lang.String:" - LDC "arg0:" - LDC "" - LDC "void" - INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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" - LDC "main" - LDC "HelloWorld" - LDC "[Ljava.lang.String;:" - LDC "args:" - LDC "" - LDC "void" - INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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; + INVOKESTATIC HelloWorld.ajc$preClinit ()V staticinitialization(void HelloWorld.<clinit>()) | RETURN staticinitialization(void HelloWorld.<clinit>()) @@ -203,6 +146,68 @@ public class HelloWorld extends java.lang.Object: method-call(void java.io.PrintStream.println(java.lang.String)) RETURN (line 11) end static final void main_aroundBody6(String[], org.aspectj.lang.JoinPoint) + + private static void ajc$preClinit(): + 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" + LDC "HelloWorld" + LDC "" + LDC "" + LDC "" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeConstructorSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/ConstructorSignature; + ICONST_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" + LDC "out" + LDC "java.lang.System" + LDC "java.io.PrintStream" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeFieldSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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" + LDC "println" + LDC "java.io.PrintStream" + LDC "java.lang.String:" + LDC "arg0:" + LDC "" + LDC "void" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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" + LDC "main" + LDC "HelloWorld" + LDC "[Ljava.lang.String;:" + LDC "args:" + LDC "" + LDC "void" + INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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; + RETURN + end private static void ajc$preClinit() end public class HelloWorld public class HelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: diff --git a/weaver/testdata/TjpBeforeHelloWorld.txt b/weaver/testdata/TjpBeforeHelloWorld.txt index 13a84c274..9a73e5605 100644 --- a/weaver/testdata/TjpBeforeHelloWorld.txt +++ b/weaver/testdata/TjpBeforeHelloWorld.txt @@ -61,6 +61,13 @@ public class HelloWorld extends java.lang.Object: end public static void main(String[]) static void <clinit>(): + INVOKESTATIC HelloWorld.ajc$preClinit ()V + staticinitialization(void HelloWorld.<clinit>()) + | RETURN + staticinitialization(void HelloWorld.<clinit>()) + end static void <clinit>() + + private static void ajc$preClinit(): NEW org.aspectj.runtime.reflect.Factory DUP LDC "HelloWorld.java" @@ -119,8 +126,6 @@ public class HelloWorld extends java.lang.Object: 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>() + RETURN + end private static void ajc$preClinit() end public class HelloWorld |