From a5e645fa9a16aba627560d058be824438ddfc890 Mon Sep 17 00:00:00 2001
From: acolyer <acolyer>
Date: Thu, 1 Sep 2005 14:17:29 +0000
Subject: fix for pr59076, much more memory efficient creation of join point
 static parts

---
 .../src/org/aspectj/weaver/bcel/LazyClassGen.java  | 123 +++++++++++++++++++--
 .../StaticEnclosingTjpBeforeHelloWorld.txt         |  18 ++-
 weaver/testdata/StaticTjpBeforeHelloWorld.txt      |  35 ++++--
 weaver/testdata/TjpAround2HelloWorld.txt           |  35 ++++--
 weaver/testdata/TjpAroundHelloWorld.txt            |  35 ++++--
 weaver/testdata/TjpBeforeHelloWorld.txt            |  35 ++++--
 6 files changed, 238 insertions(+), 43 deletions(-)

(limited to 'weaver')

diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
index 7c63a0575..887b1a16b 100644
--- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
+++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
@@ -945,13 +945,87 @@ public final class LazyClassGen {
     	
     	// create the signature
     	list.append(InstructionFactory.createLoad(factoryType, 0));
-    	list.append(new PUSH(getConstantPoolGen(), sig.getSignatureString(shadow.getWorld())));
-    	list.append(fact.createInvoke(factoryType.getClassName(), 
-    					sig.getSignatureMakerName(),
-    					new ObjectType(sig.getSignatureType()),
-    					new Type[] { Type.STRING },
-    					Constants.INVOKEVIRTUAL));
     	
+    	if (sig.getKind().equals(Member.METHOD)) {
+    		BcelWorld w = shadow.getWorld();
+    		// For methods, push the parts of the signature on.
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getModifiers(w))));
+    		list.append(new PUSH(getConstantPoolGen(),sig.getName()));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getDeclaringType())));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getParameterTypes())));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getParameterNames(w))));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getExceptions(w))));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getReturnType())));
+    		// And generate a call to the variant of makeMethodSig() that takes 7 strings
+    		list.append(fact.createInvoke(factoryType.getClassName(), 
+    				sig.getSignatureMakerName(),
+    				new ObjectType(sig.getSignatureType()),
+    				new Type[] { Type.STRING,Type.STRING,Type.STRING,Type.STRING,Type.STRING,Type.STRING,Type.STRING },
+    				Constants.INVOKEVIRTUAL));
+    	} else if (sig.getKind().equals(Member.HANDLER)) {
+    		BcelWorld w = shadow.getWorld();
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getDeclaringType())));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getParameterTypes())));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getParameterNames(w))));
+    		list.append(fact.createInvoke(factoryType.getClassName(),
+    				sig.getSignatureMakerName(),
+    				new ObjectType(sig.getSignatureType()),
+    				new Type[] { Type.STRING, Type.STRING, Type.STRING },
+    				Constants.INVOKEVIRTUAL));    	
+    	} else if(sig.getKind().equals(Member.CONSTRUCTOR)) {
+    		BcelWorld w = shadow.getWorld();
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getModifiers(w))));	
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getDeclaringType())));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getParameterTypes())));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getParameterNames(w))));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getExceptions(w))));
+    		list.append(fact.createInvoke(factoryType.getClassName(),
+    				sig.getSignatureMakerName(),
+    				new ObjectType(sig.getSignatureType()),
+    				new Type[] { Type.STRING, Type.STRING, Type.STRING, Type.STRING, Type.STRING },
+    				Constants.INVOKEVIRTUAL));    	
+    	} else if(sig.getKind().equals(Member.FIELD)) {
+    		BcelWorld w = shadow.getWorld();
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getModifiers(w))));
+    		list.append(new PUSH(getConstantPoolGen(),sig.getName()));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getDeclaringType())));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getReturnType())));
+    		list.append(fact.createInvoke(factoryType.getClassName(),
+    				sig.getSignatureMakerName(),
+    				new ObjectType(sig.getSignatureType()),
+    				new Type[] { Type.STRING, Type.STRING, Type.STRING, Type.STRING },
+    				Constants.INVOKEVIRTUAL));    	
+    	} else if(sig.getKind().equals(Member.ADVICE)) {
+    		BcelWorld w = shadow.getWorld();
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getModifiers(w))));
+    		list.append(new PUSH(getConstantPoolGen(),sig.getName()));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getDeclaringType())));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getParameterTypes())));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getParameterNames(w))));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getExceptions(w))));
+    		list.append(new PUSH(getConstantPoolGen(),makeString((sig.getReturnType()))));    		
+    		list.append(fact.createInvoke(factoryType.getClassName(),
+    				sig.getSignatureMakerName(),
+    				new ObjectType(sig.getSignatureType()),
+    				new Type[] { Type.STRING, Type.STRING, Type.STRING, Type.STRING, Type.STRING, Type.STRING, Type.STRING },
+    				Constants.INVOKEVIRTUAL));    	
+    	} else if(sig.getKind().equals(Member.STATIC_INITIALIZATION)) {
+    		BcelWorld w = shadow.getWorld();
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getModifiers(w))));
+    		list.append(new PUSH(getConstantPoolGen(),makeString(sig.getDeclaringType())));
+    		list.append(fact.createInvoke(factoryType.getClassName(),
+    				sig.getSignatureMakerName(),
+    				new ObjectType(sig.getSignatureType()),
+    				new Type[] { Type.STRING, Type.STRING },
+    				Constants.INVOKEVIRTUAL));
+    	} else {
+    	  list.append(new PUSH(getConstantPoolGen(), sig.getSignatureString(shadow.getWorld())));
+    	  list.append(fact.createInvoke(factoryType.getClassName(), 
+			  	   sig.getSignatureMakerName(),
+			  	   new ObjectType(sig.getSignatureType()),
+			  	   new Type[] { Type.STRING },
+			  	   Constants.INVOKEVIRTUAL));
+    	}   	
     	//XXX should load source location from shadow
     	list.append(Utility.createConstant(fact, shadow.getSourceLine()));
 
@@ -973,7 +1047,42 @@ public final class LazyClassGen {
     		field.getType(), Constants.PUTSTATIC));
     }
     
-
+    
+    protected String makeString(int i) {
+    	return Integer.toString(i, 16);  //??? expensive
+    }
+    
+    
+    protected String makeString(UnresolvedType t) {
+    	// this is the inverse of the odd behavior for Class.forName w/ arrays
+    	if (t.isArray()) {
+    		// this behavior matches the string used by the eclipse compiler for Foo.class literals
+    		return t.getSignature().replace('/', '.');
+    	} else {
+    		return t.getName();
+    	}
+    }
+          
+    protected String makeString(UnresolvedType[] types) {
+    	if (types == null) return "";
+    	StringBuffer buf = new StringBuffer();
+    	for (int i = 0, len=types.length; i < len; i++) {
+    		buf.append(makeString(types[i]));
+    		buf.append(':');
+    	}
+    	return buf.toString();
+    }
+       
+    protected String makeString(String[] names) {
+    	if (names == null) return "";
+    	StringBuffer buf = new StringBuffer();
+    	for (int i = 0, len=names.length; i < len; i++) {
+    		buf.append(names[i]);
+    		buf.append(':');
+    	}
+    	return buf.toString();
+    } 
+       
 	public ResolvedType getType() {
 		if (myType == null) return null;
 		return myType.getResolvedTypeX();
diff --git a/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt b/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt
index 11b4e4731..d0d4f15e1 100644
--- a/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt
+++ b/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt
@@ -41,16 +41,26 @@ public class HelloWorld extends java.lang.Object:
                     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;
+                    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;
                     BIPUSH 5
                     INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeESJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$EnclosingStaticPart;
                     PUTSTATIC HelloWorld.ajc$tjp_0 Lorg/aspectj/lang/JoinPoint$EnclosingStaticPart;
                     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;
+                    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.makeESJP (Ljava/lang/String;Lorg/aspectj/lang/Signature;I)Lorg/aspectj/lang/JoinPoint$EnclosingStaticPart;
                     PUTSTATIC HelloWorld.ajc$tjp_1 Lorg/aspectj/lang/JoinPoint$EnclosingStaticPart;
diff --git a/weaver/testdata/StaticTjpBeforeHelloWorld.txt b/weaver/testdata/StaticTjpBeforeHelloWorld.txt
index 84bc0a284..6f38203d2 100644
--- a/weaver/testdata/StaticTjpBeforeHelloWorld.txt
+++ b/weaver/testdata/StaticTjpBeforeHelloWorld.txt
@@ -43,32 +43,51 @@ public class HelloWorld extends java.lang.Object:
                     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;
+                    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;
                     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;
+                    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-println-java.io.PrintStream-java.lang.String:-arg0:--void-"
-                    INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
+                    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-main-HelloWorld-[Ljava.lang.String;:-args:--void-"
-                    INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
+                    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;
diff --git a/weaver/testdata/TjpAround2HelloWorld.txt b/weaver/testdata/TjpAround2HelloWorld.txt
index 355f5cbbd..05cd14d22 100644
--- a/weaver/testdata/TjpAround2HelloWorld.txt
+++ b/weaver/testdata/TjpAround2HelloWorld.txt
@@ -77,32 +77,51 @@ public class HelloWorld extends java.lang.Object:
                     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;
+                    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;
                     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;
+                    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-println-java.io.PrintStream-java.lang.String:-arg0:--void-"
-                    INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
+                    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-main-HelloWorld-[Ljava.lang.String;:-args:--void-"
-                    INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
+                    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;
diff --git a/weaver/testdata/TjpAroundHelloWorld.txt b/weaver/testdata/TjpAroundHelloWorld.txt
index 6cb565f84..6cb8f4544 100644
--- a/weaver/testdata/TjpAroundHelloWorld.txt
+++ b/weaver/testdata/TjpAroundHelloWorld.txt
@@ -77,32 +77,51 @@ public class HelloWorld extends java.lang.Object:
                     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;
+                    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;
                     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;
+                    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-println-java.io.PrintStream-java.lang.String:-arg0:--void-"
-                    INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
+                    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-main-HelloWorld-[Ljava.lang.String;:-args:--void-"
-                    INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
+                    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;
diff --git a/weaver/testdata/TjpBeforeHelloWorld.txt b/weaver/testdata/TjpBeforeHelloWorld.txt
index 47fdec6bc..38b3766ed 100644
--- a/weaver/testdata/TjpBeforeHelloWorld.txt
+++ b/weaver/testdata/TjpBeforeHelloWorld.txt
@@ -71,32 +71,51 @@ public class HelloWorld extends java.lang.Object:
                     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;
+                    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;
                     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;
+                    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-println-java.io.PrintStream-java.lang.String:-arg0:--void-"
-                    INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
+                    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-main-HelloWorld-[Ljava.lang.String;:-args:--void-"
-                    INVOKEVIRTUAL org.aspectj.runtime.reflect.Factory.makeMethodSig (Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
+                    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;
-- 
cgit v1.2.3