diff options
author | acolyer <acolyer> | 2005-09-01 14:17:29 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-09-01 14:17:29 +0000 |
commit | a5e645fa9a16aba627560d058be824438ddfc890 (patch) | |
tree | 741b266d5cca55d87020cb9b4311e8de6f6fd523 | |
parent | 0c44c16b6cd65aeca12a3627a8a0f22416c1801f (diff) | |
download | aspectj-a5e645fa9a16aba627560d058be824438ddfc890.tar.gz aspectj-a5e645fa9a16aba627560d058be824438ddfc890.zip |
fix for pr59076, much more memory efficient creation of join point static parts
-rw-r--r-- | lib/aspectj/lib/aspectjrt.jar | bin | 101953 -> 102747 bytes | |||
-rw-r--r-- | lib/test/aspectjrt.jar | bin | 101953 -> 102747 bytes | |||
-rw-r--r-- | runtime/src/org/aspectj/runtime/reflect/Factory.java | 156 | ||||
-rw-r--r-- | runtime/src/org/aspectj/runtime/reflect/SignatureImpl.java | 41 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java | 123 | ||||
-rw-r--r-- | weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt | 18 | ||||
-rw-r--r-- | weaver/testdata/StaticTjpBeforeHelloWorld.txt | 35 | ||||
-rw-r--r-- | weaver/testdata/TjpAround2HelloWorld.txt | 35 | ||||
-rw-r--r-- | weaver/testdata/TjpAroundHelloWorld.txt | 35 | ||||
-rw-r--r-- | weaver/testdata/TjpBeforeHelloWorld.txt | 35 |
10 files changed, 397 insertions, 81 deletions
diff --git a/lib/aspectj/lib/aspectjrt.jar b/lib/aspectj/lib/aspectjrt.jar Binary files differindex 72e4de63c..e4d62b34a 100644 --- a/lib/aspectj/lib/aspectjrt.jar +++ b/lib/aspectj/lib/aspectjrt.jar diff --git a/lib/test/aspectjrt.jar b/lib/test/aspectjrt.jar Binary files differindex 72e4de63c..e4d62b34a 100644 --- a/lib/test/aspectjrt.jar +++ b/lib/test/aspectjrt.jar diff --git a/runtime/src/org/aspectj/runtime/reflect/Factory.java b/runtime/src/org/aspectj/runtime/reflect/Factory.java index c3e662874..95c9de068 100644 --- a/runtime/src/org/aspectj/runtime/reflect/Factory.java +++ b/runtime/src/org/aspectj/runtime/reflect/Factory.java @@ -18,6 +18,8 @@ package org.aspectj.runtime.reflect; import java.lang.reflect.Constructor; import java.lang.reflect.Member; import java.lang.reflect.Method; +import java.util.Hashtable; +import java.util.StringTokenizer; import org.aspectj.lang.*; import org.aspectj.lang.reflect.*; @@ -26,6 +28,42 @@ public final class Factory { Class lexicalClass; ClassLoader lookupClassLoader; String filename; + + static Hashtable prims = new Hashtable(); + static { + prims.put("void", Void.TYPE); + prims.put("boolean", Boolean.TYPE); + prims.put("byte", Byte.TYPE); + prims.put("char", Character.TYPE); + prims.put("short", Short.TYPE); + prims.put("int", Integer.TYPE); + prims.put("long", Long.TYPE); + prims.put("float", Float.TYPE); + prims.put("double", Double.TYPE); + } + + static Class makeClass(String s, ClassLoader loader) { + if (s.equals("*")) return null; + Class ret = (Class)prims.get(s); + if (ret != null) return ret; + try { + /* The documentation of Class.forName explains why this is the right thing + * better than I could here. + */ + if (loader == null) { + return Class.forName(s); + } else { + // used to be 'return loader.loadClass(s)' but that didn't cause + // array types to be created and loaded correctly. (pr70404) + return Class.forName(s,false,loader); + } + } catch (ClassNotFoundException e) { + //System.out.println("null for: " + s); + //XXX there should be a better return value for this + return ClassNotFoundException.class; + } + } + public Factory(String filename, Class lexicalClass) { //System.out.println("making this.filename = filename; @@ -33,6 +71,8 @@ public final class Factory { lookupClassLoader = lexicalClass.getClassLoader(); } + + public JoinPoint.StaticPart makeSJP(String kind, Signature sig, SourceLocation loc) { return new JoinPointImpl.StaticPartImpl(kind, sig, loc); } @@ -112,6 +152,35 @@ public final class Factory { return ret; } + + public MethodSignature makeMethodSig(String modifiers, String methodName, String declaringType, String paramTypes, String paramNames, String exceptionTypes, String returnType) { + int modifiersAsInt = Integer.parseInt(modifiers, 16); + + Class declaringTypeClass = makeClass(declaringType,lookupClassLoader); + + StringTokenizer st = new StringTokenizer(paramTypes, ":"); + int numParams = st.countTokens(); + Class[] paramTypeClasses = new Class[numParams]; + for(int i = 0; i < numParams; i++) paramTypeClasses[i] = makeClass(st.nextToken(),lookupClassLoader); + + st = new StringTokenizer(paramNames, ":"); + numParams = st.countTokens(); + String[] paramNamesArray = new String[numParams]; + for(int i = 0; i < numParams; i++) paramNamesArray[i] = st.nextToken(); + + st = new StringTokenizer(exceptionTypes, ":"); + numParams = st.countTokens(); + Class[] exceptionTypeClasses = new Class[numParams]; + for(int i = 0; i < numParams; i++) exceptionTypeClasses[i] = makeClass(st.nextToken(),lookupClassLoader); + + Class returnTypeClass = makeClass(returnType,lookupClassLoader); + + MethodSignatureImpl ret = + new MethodSignatureImpl(modifiersAsInt, methodName, declaringTypeClass, paramTypeClasses, paramNamesArray, exceptionTypeClasses, returnTypeClass); + + return ret; + } + public MethodSignature makeMethodSig(int modifiers, String name, Class declaringType, Class[] parameterTypes, String[] parameterNames, Class[] exceptionTypes, Class returnType) { @@ -126,6 +195,32 @@ public final class Factory { return ret; } + public ConstructorSignature makeConstructorSig(String modifiers, String declaringType, String paramTypes, String paramNames, String exceptionTypes) { + int modifiersAsInt = Integer.parseInt(modifiers, 16); + + Class declaringTypeClass = makeClass(declaringType,lookupClassLoader); + + StringTokenizer st = new StringTokenizer(paramTypes, ":"); + int numParams = st.countTokens(); + Class[] paramTypeClasses = new Class[numParams]; + for(int i = 0; i < numParams; i++) paramTypeClasses[i] = makeClass(st.nextToken(),lookupClassLoader); + + st = new StringTokenizer(paramNames, ":"); + numParams = st.countTokens(); + String[] paramNamesArray = new String[numParams]; + for(int i = 0; i < numParams; i++) paramNamesArray[i] = st.nextToken(); + + st = new StringTokenizer(exceptionTypes, ":"); + numParams = st.countTokens(); + Class[] exceptionTypeClasses = new Class[numParams]; + for(int i = 0; i < numParams; i++) exceptionTypeClasses[i] = makeClass(st.nextToken(),lookupClassLoader); + + ConstructorSignatureImpl ret = new ConstructorSignatureImpl(modifiersAsInt, declaringTypeClass, paramTypeClasses, paramNamesArray, exceptionTypeClasses); + ret.setLookupClassLoader(lookupClassLoader); + return ret; + } + + public ConstructorSignature makeConstructorSig(int modifiers, Class declaringType, Class[] parameterTypes, String[] parameterNames, Class[] exceptionTypes) { ConstructorSignatureImpl ret = new ConstructorSignatureImpl(modifiers,declaringType,parameterTypes,parameterNames,exceptionTypes); @@ -139,6 +234,17 @@ public final class Factory { return ret; } + + public FieldSignature makeFieldSig(String modifiers, String name, String declaringType, String fieldType) { + int modifiersAsInt = Integer.parseInt(modifiers, 16); + Class declaringTypeClass = makeClass(declaringType,lookupClassLoader); + Class fieldTypeClass = makeClass(fieldType,lookupClassLoader); + + FieldSignatureImpl ret = new FieldSignatureImpl(modifiersAsInt, name, declaringTypeClass, fieldTypeClass); + ret.setLookupClassLoader(lookupClassLoader); + return ret; + } + public FieldSignature makeFieldSig(int modifiers, String name, Class declaringType, Class fieldType) { FieldSignatureImpl ret = new FieldSignatureImpl(modifiers,name,declaringType,fieldType); @@ -152,6 +258,33 @@ public final class Factory { return ret; } + public AdviceSignature makeAdviceSig(String modifiers, String name, String declaringType, String paramTypes, String paramNames, String exceptionTypes, String returnType) { + int modifiersAsInt = Integer.parseInt(modifiers, 16); + + Class declaringTypeClass = makeClass(declaringType,lookupClassLoader); + + StringTokenizer st = new StringTokenizer(paramTypes, ":"); + int numParams = st.countTokens(); + Class[] paramTypeClasses = new Class[numParams]; + for(int i = 0; i < numParams; i++) paramTypeClasses[i] = makeClass(st.nextToken(),lookupClassLoader); + + st = new StringTokenizer(paramNames, ":"); + numParams = st.countTokens(); + String[] paramNamesArray = new String[numParams]; + for(int i = 0; i < numParams; i++) paramNamesArray[i] = st.nextToken(); + + st = new StringTokenizer(exceptionTypes, ":"); + numParams = st.countTokens(); + Class[] exceptionTypeClasses = new Class[numParams]; + for(int i = 0; i < numParams; i++) exceptionTypeClasses[i] = makeClass(st.nextToken(),lookupClassLoader);; + + Class returnTypeClass = makeClass(returnType,lookupClassLoader); + + AdviceSignatureImpl ret = new AdviceSignatureImpl(modifiersAsInt, name, declaringTypeClass, paramTypeClasses, paramNamesArray, exceptionTypeClasses, returnTypeClass); + ret.setLookupClassLoader(lookupClassLoader); + return ret; + } + public AdviceSignature makeAdviceSig(int modifiers, String name, Class declaringType, Class[] parameterTypes, String[] parameterNames, Class[] exceptionTypes, Class returnType) { @@ -166,6 +299,15 @@ public final class Factory { return ret; } + public InitializerSignature makeInitializerSig(String modifiers, String declaringType) { + int modifiersAsInt = Integer.parseInt(modifiers, 16); + Class declaringTypeClass = makeClass(declaringType,lookupClassLoader); + + InitializerSignatureImpl ret = new InitializerSignatureImpl(modifiersAsInt, declaringTypeClass); + ret.setLookupClassLoader(lookupClassLoader); + return ret; + } + public InitializerSignature makeInitializerSig(int modifiers, Class declaringType) { InitializerSignatureImpl ret = new InitializerSignatureImpl(modifiers,declaringType); ret.setLookupClassLoader(lookupClassLoader); @@ -177,6 +319,20 @@ public final class Factory { ret.setLookupClassLoader(lookupClassLoader); return ret; } + + public CatchClauseSignature makeCatchClauseSig(String declaringType, String parameterType, String parameterName) { + Class declaringTypeClass = makeClass(declaringType,lookupClassLoader); + + StringTokenizer st = new StringTokenizer(parameterType, ":"); + Class parameterTypeClass = makeClass(st.nextToken(),lookupClassLoader); + + st = new StringTokenizer(parameterName, ":"); + String parameterNameForReturn = st.nextToken(); + + CatchClauseSignatureImpl ret = new CatchClauseSignatureImpl(declaringTypeClass, parameterTypeClass, parameterNameForReturn); + ret.setLookupClassLoader(lookupClassLoader); + return ret; + } public CatchClauseSignature makeCatchClauseSig(Class declaringType, Class parameterType, String parameterName) { diff --git a/runtime/src/org/aspectj/runtime/reflect/SignatureImpl.java b/runtime/src/org/aspectj/runtime/reflect/SignatureImpl.java index 9045880e0..127b39c25 100644 --- a/runtime/src/org/aspectj/runtime/reflect/SignatureImpl.java +++ b/runtime/src/org/aspectj/runtime/reflect/SignatureImpl.java @@ -17,7 +17,6 @@ package org.aspectj.runtime.reflect; import org.aspectj.lang.Signature; import java.lang.ref.SoftReference; -import java.util.Hashtable; import java.util.StringTokenizer; abstract class SignatureImpl implements Signature { @@ -155,44 +154,10 @@ abstract class SignatureImpl implements Signature { Class extractType(int n) { String s = extractString(n); - return makeClass(s); + return Factory.makeClass(s,getLookupClassLoader()); } - static Hashtable prims = new Hashtable(); - static { - prims.put("void", Void.TYPE); - prims.put("boolean", Boolean.TYPE); - prims.put("byte", Byte.TYPE); - prims.put("char", Character.TYPE); - prims.put("short", Short.TYPE); - prims.put("int", Integer.TYPE); - prims.put("long", Long.TYPE); - prims.put("float", Float.TYPE); - prims.put("double", Double.TYPE); - } - - Class makeClass(String s) { - if (s.equals("*")) return null; - Class ret = (Class)prims.get(s); - if (ret != null) return ret; - try { - /* The documentation of Class.forName explains why this is the right thing - * better than I could here. - */ - ClassLoader loader = getLookupClassLoader(); - if (loader == null) { - return Class.forName(s); - } else { - // used to be 'return loader.loadClass(s)' but that didn't cause - // array types to be created and loaded correctly. (pr70404) - return Class.forName(s,false,loader); - } - } catch (ClassNotFoundException e) { - //System.out.println("null for: " + s); - //XXX there should be a better return value for this - return ClassNotFoundException.class; - } - } + static String[] EMPTY_STRING_ARRAY = new String[0]; static Class[] EMPTY_CLASS_ARRAY = new Class[0]; @@ -212,7 +177,7 @@ abstract class SignatureImpl implements Signature { StringTokenizer st = new StringTokenizer(s, INNER_SEP); final int N = st.countTokens(); Class[] ret = new Class[N]; - for (int i = 0; i < N; i++) ret[i]= makeClass(st.nextToken()); + for (int i = 0; i < N; i++) ret[i]= Factory.makeClass(st.nextToken(),getLookupClassLoader()); return ret; } 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; |