http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/NameMapping.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/NameMapping.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/NameMapping.java deleted file mode 100644 index 70d74f7..0000000 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/NameMapping.java +++ /dev/null @@ -1,114 +0,0 @@ -/*** - * ASM: a very small and fast Java bytecode manipulation framework - * Copyright (c) 2000-2011 INRIA, France Telecom - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.apache.tapestry5.internal.plastic.asm.optimizer; - -import java.io.BufferedInputStream; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.HashSet; -import java.util.Properties; -import java.util.Set; - -import org.apache.tapestry5.internal.plastic.asm.Type; - -/** - * A MAPPING from names to names, used to rename classes, fields and methods. - * - * @author Eric Bruneton - */ -public class NameMapping { - - public final Properties mapping; - - public final Set<Object> unused; - - public NameMapping(final String file) throws IOException { - mapping = new Properties(); - InputStream is = null; - try { - is = new BufferedInputStream(new FileInputStream(file)); - mapping.load(is); - unused = new HashSet<Object>(mapping.keySet()); - } finally { - if (is != null) { - is.close(); - } - } - } - - public String map(final String name) { - String s = (String) mapping.get(name); - if (s == null) { - int p = name.indexOf('.'); - if (p == -1) { - s = name; - } else { - int q = name.indexOf('('); - if (q == -1) { - s = name.substring(p + 1); - } else { - s = name.substring(p + 1, q); - } - } - } else { - unused.remove(name); - } - return s; - } - - public String fix(final String desc) { - if (desc.startsWith("(")) { - Type[] arguments = Type.getArgumentTypes(desc); - Type result = Type.getReturnType(desc); - for (int i = 0; i < arguments.length; ++i) { - arguments[i] = fix(arguments[i]); - } - result = fix(result); - return Type.getMethodDescriptor(result, arguments); - } else { - return fix(Type.getType(desc)).getDescriptor(); - } - } - - private Type fix(final Type t) { - if (t.getSort() == Type.OBJECT) { - return Type.getObjectType(map(t.getInternalName())); - } else if (t.getSort() == Type.ARRAY) { - String s = fix(t.getElementType()).getDescriptor(); - for (int i = 0; i < t.getDimensions(); ++i) { - s = '[' + s; - } - return Type.getType(s); - } else { - return t; - } - } -}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/Shrinker.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/Shrinker.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/Shrinker.java deleted file mode 100644 index 39b1d41..0000000 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/Shrinker.java +++ /dev/null @@ -1,282 +0,0 @@ -/*** - * ASM: a very small and fast Java bytecode manipulation framework - * Copyright (c) 2000-2011 INRIA, France Telecom - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.apache.tapestry5.internal.plastic.asm.optimizer; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.TreeSet; - -import org.apache.tapestry5.internal.plastic.asm.ClassReader; -import org.apache.tapestry5.internal.plastic.asm.ClassWriter; -import org.apache.tapestry5.internal.plastic.asm.Handle; -import org.apache.tapestry5.internal.plastic.asm.Type; -import org.apache.tapestry5.internal.plastic.asm.commons.Remapper; -import org.apache.tapestry5.internal.plastic.asm.commons.SimpleRemapper; - -/** - * A class file shrinker utility. - * - * @author Eric Bruneton - * @author Eugene Kuleshov - */ -public class Shrinker { - - static final HashMap<String, String> MAPPING = new HashMap<String, String>(); - - public static void main(final String[] args) throws IOException { - Properties properties = new Properties(); - int n = args.length - 1; - for (int i = 0; i < n - 1; ++i) { - properties.load(new FileInputStream(args[i])); - } - - for (Map.Entry<Object, Object> entry : properties.entrySet()) { - MAPPING.put((String) entry.getKey(), (String) entry.getValue()); - } - - final Set<String> unused = new HashSet<String>(MAPPING.keySet()); - - File f = new File(args[n - 1]); - File d = new File(args[n]); - - optimize(f, d, new SimpleRemapper(MAPPING) { - @Override - public String map(String key) { - String s = super.map(key); - if (s != null) { - unused.remove(key); - } - return s; - } - }); - - Iterator<String> i = unused.iterator(); - while (i.hasNext()) { - String s = i.next(); - if (!s.endsWith("/remove")) { - System.out.println("INFO: unused mapping " + s); - } - } - } - - static void optimize(final File f, final File d, final Remapper remapper) - throws IOException { - if (f.isDirectory()) { - File[] files = f.listFiles(); - for (int i = 0; i < files.length; ++i) { - optimize(files[i], d, remapper); - } - } else if (f.getName().endsWith(".class")) { - ConstantPool cp = new ConstantPool(); - ClassReader cr = new ClassReader(new FileInputStream(f)); - // auto-boxing removal requires to recompute the maxs - ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); - ClassConstantsCollector ccc = new ClassConstantsCollector(cw, cp); - ClassOptimizer co = new ClassOptimizer(ccc, remapper); - cr.accept(co, ClassReader.SKIP_DEBUG); - - Set<Constant> constants = new TreeSet<Constant>( - new ConstantComparator()); - constants.addAll(cp.values()); - - cr = new ClassReader(cw.toByteArray()); - cw = new ClassWriter(0); - Iterator<Constant> i = constants.iterator(); - while (i.hasNext()) { - Constant c = i.next(); - c.write(cw); - } - cr.accept(cw, ClassReader.SKIP_DEBUG); - - if (MAPPING.get(cr.getClassName() + "/remove") != null) { - return; - } - String n = remapper.mapType(cr.getClassName()); - File g = new File(d, n + ".class"); - if (!g.exists() || g.lastModified() < f.lastModified()) { - if (!g.getParentFile().exists() && !g.getParentFile().mkdirs()) { - throw new IOException("Cannot create directory " - + g.getParentFile()); - } - OutputStream os = new FileOutputStream(g); - try { - os.write(cw.toByteArray()); - } finally { - os.close(); - } - } - } - } - - static class ConstantComparator implements Comparator<Constant> { - - public int compare(final Constant c1, final Constant c2) { - int d = getSort(c1) - getSort(c2); - if (d == 0) { - switch (c1.type) { - case 'I': - return ((Integer)c1.intVal).compareTo(c2.intVal); - case 'J': - return ((Long)c1.longVal).compareTo(c2.longVal); - case 'F': - return ((Float)c1.floatVal).compareTo(c2.floatVal); - case 'D': - return ((Double)c1.doubleVal).compareTo(c2.doubleVal); - case 's': - case 'S': - case 'C': - case 't': - return c1.strVal1.compareTo(c2.strVal1); - case 'T': - d = c1.strVal1.compareTo(c2.strVal1); - if (d == 0) { - d = c1.strVal2.compareTo(c2.strVal2); - } - break; - case 'y': - d = c1.strVal1.compareTo(c2.strVal1); - if (d == 0) { - d = c1.strVal2.compareTo(c2.strVal2); - if (d == 0) { - Handle bsm1 = (Handle) c1.objVal3; - Handle bsm2 = (Handle) c2.objVal3; - d = compareHandle(bsm1, bsm2); - if (d == 0) { - d = compareObjects(c1.objVals, c2.objVals); - } - } - } - break; - - default: - d = c1.strVal1.compareTo(c2.strVal1); - if (d == 0) { - d = c1.strVal2.compareTo(c2.strVal2); - if (d == 0) { - d = ((String) c1.objVal3) - .compareTo((String) c2.objVal3); - } - } - } - } - return d; - } - - private static int compareHandle(Handle h1, Handle h2) { - int d = h1.getTag() - h2.getTag(); - if (d == 0) { - d = h1.getOwner().compareTo(h2.getOwner()); - if (d == 0) { - d = h1.getName().compareTo(h2.getName()); - if (d == 0) { - d = h1.getDesc().compareTo(h2.getDesc()); - } - } - } - return d; - } - - private static int compareType(Type mtype1, Type mtype2) { - return mtype1.getDescriptor().compareTo(mtype2.getDescriptor()); - } - - @SuppressWarnings("unchecked") - private static int compareObjects(Object[] objVals1, Object[] objVals2) { - int length = objVals1.length; - int d = length - objVals2.length; - if (d == 0) { - for (int i = 0; i < length; i++) { - Object objVal1 = objVals1[i]; - Object objVal2 = objVals2[i]; - d = objVal1.getClass().getName() - .compareTo(objVal2.getClass().getName()); - if (d == 0) { - if (objVal1 instanceof Type) { - d = compareType((Type) objVal1, (Type) objVal2); - } else if (objVal1 instanceof Handle) { - d = compareHandle((Handle) objVal1, - (Handle) objVal2); - } else { - d = ((Comparable<Object>) objVal1).compareTo(objVal2); - } - } - - if (d != 0) { - return d; - } - } - } - return 0; - } - - private static int getSort(final Constant c) { - switch (c.type) { - case 'I': - return 0; - case 'J': - return 1; - case 'F': - return 2; - case 'D': - return 3; - case 's': - return 4; - case 'S': - return 5; - case 'C': - return 6; - case 'T': - return 7; - case 'G': - return 8; - case 'M': - return 9; - case 'N': - return 10; - case 'y': - return 11; - case 't': - return 12; - default: - return 100 + c.type - 'h'; - } - } - } -} http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/jdk1.2.2_017.txt.gz ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/jdk1.2.2_017.txt.gz b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/jdk1.2.2_017.txt.gz deleted file mode 100644 index 39cdf9d..0000000 Binary files a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/jdk1.2.2_017.txt.gz and /dev/null differ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/jdk1.3.1_19.txt.gz ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/jdk1.3.1_19.txt.gz b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/jdk1.3.1_19.txt.gz deleted file mode 100644 index a3c7aa6..0000000 Binary files a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/jdk1.3.1_19.txt.gz and /dev/null differ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-annotations.properties ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-annotations.properties b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-annotations.properties deleted file mode 100644 index 03fec2e..0000000 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-annotations.properties +++ /dev/null @@ -1,53 +0,0 @@ -############################################################################### -#ASM: a very small and fast Java bytecode manipulation framework -#Copyright (c) 2000-2011 INRIA, France Telecom -#All rights reserved. -# -#Redistribution and use in source and binary forms, with or without -#modification, are permitted provided that the following conditions -#are met: -#1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -#2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -#3. Neither the name of the copyright holders nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -#ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -#LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -#CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -#SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -#INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -#CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -#ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -#THE POSSIBILITY OF SUCH DAMAGE. -############################################################################### - -# class mappings - -org/objectweb/asm/AnnotationWriter/remove=true - -# field mappings - -org/objectweb/asm/ClassWriter.anns=- -org/objectweb/asm/ClassWriter.ianns=- - -org/objectweb/asm/FieldWriter.anns=- -org/objectweb/asm/FieldWriter.ianns=- - -org/objectweb/asm/MethodWriter.annd=- -org/objectweb/asm/MethodWriter.anns=- -org/objectweb/asm/MethodWriter.ianns=- -org/objectweb/asm/MethodWriter.panns=- -org/objectweb/asm/MethodWriter.ipanns=- - -# method mappings - -org/objectweb/asm/ClassReader.readAnnotationValue(I[CLjava/lang/String;Lorg/objectweb/asm/AnnotationVisitor;)I=- -org/objectweb/asm/ClassReader.readAnnotationValues(I[CZLorg/objectweb/asm/AnnotationVisitor;)I=- -org/objectweb/asm/ClassReader.readParameterAnnotations(I[CZLorg/objectweb/asm/MethodVisitor;)V=- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-frames.properties ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-frames.properties b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-frames.properties deleted file mode 100644 index ecf580f..0000000 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-frames.properties +++ /dev/null @@ -1,62 +0,0 @@ -############################################################################### -#ASM: a very small and fast Java bytecode manipulation framework -#Copyright (c) 2000-2011 INRIA, France Telecom -#All rights reserved. -# -#Redistribution and use in source and binary forms, with or without -#modification, are permitted provided that the following conditions -#are met: -#1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -#2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -#3. Neither the name of the copyright holders nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -#ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -#LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -#CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -#SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -#INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -#CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -#ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -#THE POSSIBILITY OF SUCH DAMAGE. -############################################################################### - -# class mappings - -org/objectweb/asm/Frame/remove=true - -# field mappings - -org/objectweb/asm/ClassWriter.typeCount=- -org/objectweb/asm/ClassWriter.typeTable=- - -org/objectweb/asm/Label.frame=- - -org/objectweb/asm/MethodWriter.frameCount=- -org/objectweb/asm/MethodWriter.stackMap=- -org/objectweb/asm/MethodWriter.previousFrameOffset=- -org/objectweb/asm/MethodWriter.previousFrame=- -org/objectweb/asm/MethodWriter.frameIndex=- -org/objectweb/asm/MethodWriter.frame=- - -# method mappings - -org/objectweb/asm/ClassReader.readFrameType([Ljava/lang/Object;II[C[Lorg/objectweb/asm/Label;)I=- - -org/objectweb/asm/ClassWriter.addType(Ljava/lang/String;)I=- -org/objectweb/asm/ClassWriter.addUninitializedType(Ljava/lang/String;I)I=- -org/objectweb/asm/ClassWriter.addType(Lorg/objectweb/asm/Item;)Lorg/objectweb/asm/Item;=- -org/objectweb/asm/ClassWriter.getMergedType(II)I=- - -org/objectweb/asm/MethodWriter.startFrame(III)V=- -org/objectweb/asm/MethodWriter.endFrame()V=- -org/objectweb/asm/MethodWriter.writeFrame()V=- -org/objectweb/asm/MethodWriter.writeFrameTypes(II)V=- -org/objectweb/asm/MethodWriter.writeFrameType(Ljava/lang/Object;)V=- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-resize.properties ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-resize.properties b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-resize.properties deleted file mode 100644 index 97f7e34..0000000 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-resize.properties +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################### -#ASM: a very small and fast Java bytecode manipulation framework -#Copyright (c) 2000-2011 INRIA, France Telecom -#All rights reserved. -# -#Redistribution and use in source and binary forms, with or without -#modification, are permitted provided that the following conditions -#are met: -#1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -#2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -#3. Neither the name of the copyright holders nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -#ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -#LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -#CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -#SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -#INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -#CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -#ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -#THE POSSIBILITY OF SUCH DAMAGE. -############################################################################### - -# class mappings - -# field mappings - -# method mappings - -org/objectweb/asm/MethodWriter.resizeInstructions()V=- \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-signatures.properties ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-signatures.properties b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-signatures.properties deleted file mode 100644 index 6a48623..0000000 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-signatures.properties +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################### -#ASM: a very small and fast Java bytecode manipulation framework -#Copyright (c) 2000-2011 INRIA, France Telecom -#All rights reserved. -# -#Redistribution and use in source and binary forms, with or without -#modification, are permitted provided that the following conditions -#are met: -#1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -#2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -#3. Neither the name of the copyright holders nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -#ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -#LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -#CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -#SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -#INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -#CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -#ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -#THE POSSIBILITY OF SUCH DAMAGE. -############################################################################### - -# class mappings - -org/objectweb/asm/signature/SignatureReader/remove=true -org/objectweb/asm/signature/SignatureVisitor/remove=true -org/objectweb/asm/signature/SignatureWriter/remove=true - -# field mappings - -org/objectweb/asm/ClassWriter.signature=- - -org/objectweb/asm/FieldWriter.signature=- - -org/objectweb/asm/MethodWriter.signature=- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-writer.properties ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-writer.properties b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-writer.properties deleted file mode 100644 index 1c83ca2..0000000 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-writer.properties +++ /dev/null @@ -1,66 +0,0 @@ -############################################################################### -#ASM: a very small and fast Java bytecode manipulation framework -#Copyright (c) 2000-2011 INRIA, France Telecom -#All rights reserved. -# -#Redistribution and use in source and binary forms, with or without -#modification, are permitted provided that the following conditions -#are met: -#1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -#2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -#3. Neither the name of the copyright holders nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -#ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -#LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -#CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -#SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -#INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -#CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -#ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -#THE POSSIBILITY OF SUCH DAMAGE. -############################################################################### - -# class mappings - -org/objectweb/asm/AnnotationWriter/remove=true -org/objectweb/asm/ByteVector/remove=true -org/objectweb/asm/ClassWriter/remove=true -org/objectweb/asm/Edge/remove=true -org/objectweb/asm/FieldWriter/remove=true -org/objectweb/asm/Frame/remove=true -org/objectweb/asm/Handler/remove=true -org/objectweb/asm/Item/remove=true -org/objectweb/asm/MethodWriter/remove=true - -# field mappings - -org/objectweb/asm/Label.position=- -org/objectweb/asm/Label.referenceCount=- -org/objectweb/asm/Label.srcAndRefPositions=- -org/objectweb/asm/Label.inputStackTop=- -org/objectweb/asm/Label.outputStackMax=- -org/objectweb/asm/Label.frame=- -org/objectweb/asm/Label.successor=- -org/objectweb/asm/Label.successors=- -org/objectweb/asm/Label.next=- - -# method mappings - -org/objectweb/asm/ClassReader.copyPool(Lorg/objectweb/asm/ClassWriter;)V=- - -org/objectweb/asm/Label.addReference(II)V=- -org/objectweb/asm/Label.put(Lorg/objectweb/asm/MethodWriter;Lorg/objectweb/asm/ByteVector;IZ)V=- -org/objectweb/asm/Label.resolve(Lorg/objectweb/asm/MethodWriter;I[B)Z=- -org/objectweb/asm/Label.getFirst()Lorg/objectweb/asm/Label;=- -org/objectweb/asm/Label.inSubroutine(J)Z=- -org/objectweb/asm/Label.inSameSubroutine(Lorg/objectweb/asm/Label;)Z=- -org/objectweb/asm/Label.addToSubroutine(JI)V=- -org/objectweb/asm/Label.visitSubroutine(Lorg/objectweb/asm/Label;JI)V=- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink.properties ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink.properties b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink.properties deleted file mode 100644 index 4b5e3b2..0000000 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink.properties +++ /dev/null @@ -1,381 +0,0 @@ -############################################################################### -#ASM: a very small and fast Java bytecode manipulation framework -#Copyright (c) 2000-2011 INRIA, France Telecom -#All rights reserved. -# -#Redistribution and use in source and binary forms, with or without -#modification, are permitted provided that the following conditions -#are met: -#1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -#2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -#3. Neither the name of the copyright holders nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -#ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -#LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -#CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -#SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -#INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -#CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -#ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -#THE POSSIBILITY OF SUCH DAMAGE. -############################################################################### - -# class mappings - -#org/objectweb/asm/Edge=org/objectweb/asm/a -#org/objectweb/asm/Item=org/objectweb/asm/b -#org/objectweb/asm/FieldWriter=org/objectweb/asm/c -#org/objectweb/asm/MethodWriter=org/objectweb/asm/d -#org/objectweb/asm/AnnotationWriter=org/objectweb/asm/e -#org/objectweb/asm/Context=org/objectweb/asm/f - -java/lang/StringBuilder=java/lang/StringBuffer - - -# field mappings - -org/objectweb/asm/AnnotationWriter.cw=a -org/objectweb/asm/AnnotationWriter.size=b -org/objectweb/asm/AnnotationWriter.named=c -org/objectweb/asm/AnnotationWriter.bv=d -org/objectweb/asm/AnnotationWriter.parent=e -org/objectweb/asm/AnnotationWriter.offset=f -org/objectweb/asm/AnnotationWriter.next=g -org/objectweb/asm/AnnotationWriter.prev=h - -org/objectweb/asm/Attribute.next=a -org/objectweb/asm/Attribute.value=b - -org/objectweb/asm/ByteVector.data=a -org/objectweb/asm/ByteVector.length=b - -org/objectweb/asm/ClassReader.items=a -org/objectweb/asm/ClassReader.strings=c -org/objectweb/asm/ClassReader.maxStringLength=d -#org/objectweb/asm/ClassReader.header=e - -org/objectweb/asm/Context.attrs=a -org/objectweb/asm/Context.flags=b -org/objectweb/asm/Context.buffer=c -org/objectweb/asm/Context.bootstrapMethods=d -org/objectweb/asm/Context.access=e -org/objectweb/asm/Context.name=f -org/objectweb/asm/Context.desc=g -org/objectweb/asm/Context.labels=h -org/objectweb/asm/Context.typeRef=i -org/objectweb/asm/Context.typePath=j -org/objectweb/asm/Context.offset=k -org/objectweb/asm/Context.start=l -org/objectweb/asm/Context.end=m -org/objectweb/asm/Context.index=n -org/objectweb/asm/Context.offset=o -org/objectweb/asm/Context.mode=p -org/objectweb/asm/Context.localCount=q -org/objectweb/asm/Context.localDiff=r -org/objectweb/asm/Context.local=s -org/objectweb/asm/Context.stackCount=t -org/objectweb/asm/Context.stack=u - -org/objectweb/asm/ClassWriter.TYPE=a -org/objectweb/asm/ClassWriter.version=b -org/objectweb/asm/ClassWriter.index=c -org/objectweb/asm/ClassWriter.pool=d -org/objectweb/asm/ClassWriter.items=e -org/objectweb/asm/ClassWriter.threshold=f -org/objectweb/asm/ClassWriter.key=g -org/objectweb/asm/ClassWriter.key2=h -org/objectweb/asm/ClassWriter.key3=i -org/objectweb/asm/ClassWriter.key4=j -org/objectweb/asm/ClassWriter.access=k -org/objectweb/asm/ClassWriter.name=l -org/objectweb/asm/ClassWriter.signature=m -org/objectweb/asm/ClassWriter.superName=n -org/objectweb/asm/ClassWriter.interfaceCount=o -org/objectweb/asm/ClassWriter.interfaces=p -org/objectweb/asm/ClassWriter.sourceFile=q -org/objectweb/asm/ClassWriter.sourceDebug=r -org/objectweb/asm/ClassWriter.enclosingMethodOwner=s -org/objectweb/asm/ClassWriter.enclosingMethod=t -org/objectweb/asm/ClassWriter.anns=u -org/objectweb/asm/ClassWriter.ianns=v -org/objectweb/asm/ClassWriter.tanns=N -org/objectweb/asm/ClassWriter.itanns=O -org/objectweb/asm/ClassWriter.attrs=w -org/objectweb/asm/ClassWriter.innerClassesCount=x -org/objectweb/asm/ClassWriter.innerClasses=y -org/objectweb/asm/ClassWriter.bootstrapMethodsCount=z -org/objectweb/asm/ClassWriter.bootstrapMethods=A -org/objectweb/asm/ClassWriter.firstField=B -org/objectweb/asm/ClassWriter.lastField=C -org/objectweb/asm/ClassWriter.firstMethod=D -org/objectweb/asm/ClassWriter.lastMethod=E -org/objectweb/asm/ClassWriter.computeMaxs=F -org/objectweb/asm/ClassWriter.typeCount=G -org/objectweb/asm/ClassWriter.typeTable=H -org/objectweb/asm/ClassWriter.thisName=I -org/objectweb/asm/ClassWriter.computeFrames=J -org/objectweb/asm/ClassWriter.computeMaxs=K -org/objectweb/asm/ClassWriter.invalidFrames=L -org/objectweb/asm/ClassWriter.cr=M - -org/objectweb/asm/Edge.info=a -org/objectweb/asm/Edge.successor=b -org/objectweb/asm/Edge.next=c - -org/objectweb/asm/Handler.start=a -org/objectweb/asm/Handler.end=b -org/objectweb/asm/Handler.handler=c -org/objectweb/asm/Handler.desc=d -org/objectweb/asm/Handler.type=e -org/objectweb/asm/Handler.next=f - -org/objectweb/asm/FieldWriter.cw=b -org/objectweb/asm/FieldWriter.access=c -org/objectweb/asm/FieldWriter.name=d -org/objectweb/asm/FieldWriter.desc=e -org/objectweb/asm/FieldWriter.signature=f -org/objectweb/asm/FieldWriter.value=g -org/objectweb/asm/FieldWriter.anns=h -org/objectweb/asm/FieldWriter.ianns=i -org/objectweb/asm/FieldWriter.tanns=k -org/objectweb/asm/FieldWriter.itanns=l -org/objectweb/asm/FieldWriter.attrs=j - -org/objectweb/asm/Item.index=a -org/objectweb/asm/Item.type=b -org/objectweb/asm/Item.intVal=c -org/objectweb/asm/Item.longVal=d -org/objectweb/asm/Item.strVal1=g -org/objectweb/asm/Item.strVal2=h -org/objectweb/asm/Item.strVal3=i -org/objectweb/asm/Item.hashCode=j -org/objectweb/asm/Item.next=k - -org/objectweb/asm/Label.status=a -org/objectweb/asm/Label.line=b -org/objectweb/asm/Label.position=c -org/objectweb/asm/Label.referenceCount=d -org/objectweb/asm/Label.srcAndRefPositions=e -org/objectweb/asm/Label.inputStackTop=f -org/objectweb/asm/Label.outputStackMax=g -org/objectweb/asm/Label.frame=h -org/objectweb/asm/Label.successor=i -org/objectweb/asm/Label.successors=j -org/objectweb/asm/Label.next=k - -org/objectweb/asm/Frame.SIZE=a -org/objectweb/asm/Frame.owner=b -org/objectweb/asm/Frame.inputLocals=c -org/objectweb/asm/Frame.inputStack=d -org/objectweb/asm/Frame.outputLocals=e -org/objectweb/asm/Frame.outputStack=f -org/objectweb/asm/Frame.outputStackTop=g -org/objectweb/asm/Frame.initializationCount=h -org/objectweb/asm/Frame.initializations=i - -org/objectweb/asm/MethodWriter.cw=b -org/objectweb/asm/MethodWriter.access=c -org/objectweb/asm/MethodWriter.name=d -org/objectweb/asm/MethodWriter.desc=e -org/objectweb/asm/MethodWriter.descriptor=f -org/objectweb/asm/MethodWriter.signature=g -org/objectweb/asm/MethodWriter.classReaderOffset=h -org/objectweb/asm/MethodWriter.classReaderLength=i -org/objectweb/asm/MethodWriter.exceptionCount=j -org/objectweb/asm/MethodWriter.exceptions=k -org/objectweb/asm/MethodWriter.annd=l -org/objectweb/asm/MethodWriter.anns=m -org/objectweb/asm/MethodWriter.ianns=n -org/objectweb/asm/MethodWriter.tanns=U -org/objectweb/asm/MethodWriter.itanns=V -org/objectweb/asm/MethodWriter.panns=o -org/objectweb/asm/MethodWriter.ipanns=p -org/objectweb/asm/MethodWriter.attrs=q -org/objectweb/asm/MethodWriter.code=r -org/objectweb/asm/MethodWriter.maxStack=s -org/objectweb/asm/MethodWriter.maxLocals=t -org/objectweb/asm/MethodWriter.currentLocals=T -org/objectweb/asm/MethodWriter.frameCount=u -org/objectweb/asm/MethodWriter.stackMap=v -org/objectweb/asm/MethodWriter.previousFrameOffset=w -org/objectweb/asm/MethodWriter.previousFrame=x -#org/objectweb/asm/MethodWriter.frameIndex=y -org/objectweb/asm/MethodWriter.frame=z -org/objectweb/asm/MethodWriter.handlerCount=A -org/objectweb/asm/MethodWriter.firstHandler=B -org/objectweb/asm/MethodWriter.lastHandler=C -org/objectweb/asm/MethodWriter.methodParametersCount=Z -org/objectweb/asm/MethodWriter.methodParameters=$ -org/objectweb/asm/MethodWriter.localVarCount=D -org/objectweb/asm/MethodWriter.localVar=E -org/objectweb/asm/MethodWriter.localVarTypeCount=F -org/objectweb/asm/MethodWriter.localVarType=G -org/objectweb/asm/MethodWriter.lineNumberCount=H -org/objectweb/asm/MethodWriter.lineNumber=I -org/objectweb/asm/MethodWriter.lastCodeOffset=Y -org/objectweb/asm/MethodWriter.ctanns=W -org/objectweb/asm/MethodWriter.ictanns=X -org/objectweb/asm/MethodWriter.cattrs=J -org/objectweb/asm/MethodWriter.resize=K -org/objectweb/asm/MethodWriter.subroutines=L -org/objectweb/asm/MethodWriter.compute=M -org/objectweb/asm/MethodWriter.labels=N -org/objectweb/asm/MethodWriter.previousBlock=O -org/objectweb/asm/MethodWriter.currentBlock=P -org/objectweb/asm/MethodWriter.stackSize=Q -org/objectweb/asm/MethodWriter.maxStackSize=R -org/objectweb/asm/MethodWriter.synthetics=S - -org/objectweb/asm/Type.sort=a -org/objectweb/asm/Type.buf=b -org/objectweb/asm/Type.off=c -org/objectweb/asm/Type.len=d - -org/objectweb/asm/TypeReference.value=a - -org/objectweb/asm/TypePath.b=a -org/objectweb/asm/TypePath.offset=b - -org/objectweb/asm/Handle.tag=a -org/objectweb/asm/Handle.owner=b -org/objectweb/asm/Handle.name=c -org/objectweb/asm/Handle.desc=d - -org/objectweb/asm/signature/SignatureReader.signature=a - -org/objectweb/asm/signature/SignatureWriter.buf=a -org/objectweb/asm/signature/SignatureWriter.hasFormals=b -org/objectweb/asm/signature/SignatureWriter.hasParameters=c -org/objectweb/asm/signature/SignatureWriter.argumentStack=d - -# method mappings - -org/objectweb/asm/AnnotationWriter.getSize()I=a -org/objectweb/asm/AnnotationWriter.put([Lorg/objectweb/asm/AnnotationWriter;ILorg/objectweb/asm/ByteVector;)V=a -org/objectweb/asm/AnnotationWriter.put(Lorg/objectweb/asm/ByteVector;)V=a -org/objectweb/asm/AnnotationWriter.putTarget(ILorg/objectweb/asm/TypePath;Lorg/objectweb/asm/ByteVector;)V=a - -org/objectweb/asm/Attribute.getCount()I=a -org/objectweb/asm/Attribute.getSize(Lorg/objectweb/asm/ClassWriter;[BIII)I=a -org/objectweb/asm/Attribute.put(Lorg/objectweb/asm/ClassWriter;[BIIILorg/objectweb/asm/ByteVector;)V=a - -org/objectweb/asm/ByteVector.enlarge(I)V=a -org/objectweb/asm/ByteVector.put11(II)Lorg/objectweb/asm/ByteVector;=a -org/objectweb/asm/ByteVector.put12(II)Lorg/objectweb/asm/ByteVector;=b -org/objectweb/asm/ByteVector.encodeUTF8(Ljava/lang/String;II)Lorg/objectweb/asm/ByteVector;=c - -org/objectweb/asm/ClassReader.copyPool(Lorg/objectweb/asm/ClassWriter;)V=a -org/objectweb/asm/ClassReader.copyBootstrapMethods(Lorg/objectweb/asm/ClassWriter;[Lorg/objectweb/asm/Item;[C)V=a -org/objectweb/asm/ClassReader.readField(Lorg/objectweb/asm/ClassVisitor;Lorg/objectweb/asm/Context;I)I=a -org/objectweb/asm/ClassReader.readMethod(Lorg/objectweb/asm/ClassVisitor;Lorg/objectweb/asm/Context;I)I=b -org/objectweb/asm/ClassReader.readCode(Lorg/objectweb/asm/MethodVisitor;Lorg/objectweb/asm/Context;I)V=a -org/objectweb/asm/ClassReader.readTypeAnnotations(Lorg/objectweb/asm/MethodVisitor;Lorg/objectweb/asm/Context;IZ)[I=a -org/objectweb/asm/ClassReader.readAnnotationTarget(Lorg/objectweb/asm/Context;I)I=a -org/objectweb/asm/ClassReader.readAnnotationValues(I[CZLorg/objectweb/asm/AnnotationVisitor;)I=a -org/objectweb/asm/ClassReader.readAnnotationValue(I[CLjava/lang/String;Lorg/objectweb/asm/AnnotationVisitor;)I=a -org/objectweb/asm/ClassReader.getAttributes()I=a -org/objectweb/asm/ClassReader.readAttribute([Lorg/objectweb/asm/Attribute;Ljava/lang/String;II[CI[Lorg/objectweb/asm/Label;)Lorg/objectweb/asm/Attribute;=a -org/objectweb/asm/ClassReader.readClass(Ljava/io/InputStream;Z)[B=a -org/objectweb/asm/ClassReader.readParameterAnnotations(Lorg/objectweb/asm/MethodVisitor;Lorg/objectweb/asm/Context;IZ)V=b -org/objectweb/asm/ClassReader.readUTF(II[C)Ljava/lang/String;=a -org/objectweb/asm/ClassReader.getImplicitFrame(Lorg/objectweb/asm/Context;)V=a -org/objectweb/asm/ClassReader.readFrame(IZZLorg/objectweb/asm/Context;)I=a -org/objectweb/asm/ClassReader.readFrameType([Ljava/lang/Object;II[C[Lorg/objectweb/asm/Label;)I=a - -org/objectweb/asm/ClassWriter.get(Lorg/objectweb/asm/Item;)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.newClassItem(Ljava/lang/String;)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.newConstItem(Ljava/lang/Object;)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.newDouble(D)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.newFloat(F)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.newInteger(I)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.newLong(J)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.newMethodItem(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.newString(Ljava/lang/String;)Lorg/objectweb/asm/Item;=b -org/objectweb/asm/ClassWriter.put122(III)V=a -org/objectweb/asm/ClassWriter.put112(III)V=b -org/objectweb/asm/ClassWriter.put(Lorg/objectweb/asm/Item;)V=b -org/objectweb/asm/ClassWriter.newFieldItem(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.addType(Ljava/lang/String;)I=c -org/objectweb/asm/ClassWriter.addUninitializedType(Ljava/lang/String;I)I=a -org/objectweb/asm/ClassWriter.addType(Lorg/objectweb/asm/Item;)Lorg/objectweb/asm/Item;=c -org/objectweb/asm/ClassWriter.getMergedType(II)I=a -org/objectweb/asm/ClassWriter.newNameTypeItem(Ljava/lang/String;Ljava/lang/String;)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.newMethodTypeItem(Ljava/lang/String;)Lorg/objectweb/asm/Item;=c -org/objectweb/asm/ClassWriter.newHandleItem(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/objectweb/asm/Item;=a -org/objectweb/asm/ClassWriter.newInvokeDynamicItem(Ljava/lang/String;Ljava/lang/String;Lorg/objectweb/asm/Handle;[Ljava/lang/Object;)Lorg/objectweb/asm/Item;=a - -org/objectweb/asm/FieldWriter.getSize()I=a -org/objectweb/asm/FieldWriter.put(Lorg/objectweb/asm/ByteVector;)V=a - -org/objectweb/asm/Item.isEqualTo(Lorg/objectweb/asm/Item;)Z=a -org/objectweb/asm/Item.set(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V=a -org/objectweb/asm/Item.set(D)V=a -org/objectweb/asm/Item.set(F)V=a -org/objectweb/asm/Item.set(I)V=a -org/objectweb/asm/Item.set(J)V=a -org/objectweb/asm/Item.set(Ljava/lang/String;Ljava/lang/String;I)V=a -org/objectweb/asm/Item.set(II)V=a - -org/objectweb/asm/Label.addReference(II)V=a -org/objectweb/asm/Label.put(Lorg/objectweb/asm/MethodWriter;Lorg/objectweb/asm/ByteVector;IZ)V=a -org/objectweb/asm/Label.resolve(Lorg/objectweb/asm/MethodWriter;I[B)Z=a -org/objectweb/asm/Label.getFirst()Lorg/objectweb/asm/Label;=a -org/objectweb/asm/Label.inSubroutine(J)Z=a -org/objectweb/asm/Label.inSameSubroutine(Lorg/objectweb/asm/Label;)Z=a -org/objectweb/asm/Label.addToSubroutine(JI)V=a -org/objectweb/asm/Label.visitSubroutine(Lorg/objectweb/asm/Label;JI)V=b - -org/objectweb/asm/Frame.get(I)I=a -org/objectweb/asm/Frame.set(II)V=a -org/objectweb/asm/Frame.push(I)V=b -org/objectweb/asm/Frame.push(Lorg/objectweb/asm/ClassWriter;Ljava/lang/String;)V=a -org/objectweb/asm/Frame.type(Lorg/objectweb/asm/ClassWriter;Ljava/lang/String;)I=b -org/objectweb/asm/Frame.pop()I=a -org/objectweb/asm/Frame.pop(Ljava/lang/String;)V=a -org/objectweb/asm/Frame.pop(I)V=c -org/objectweb/asm/Frame.init(I)V=d -org/objectweb/asm/Frame.init(Lorg/objectweb/asm/ClassWriter;I)I=a -org/objectweb/asm/Frame.initInputFrame(Lorg/objectweb/asm/ClassWriter;I[Lorg/objectweb/asm/Type;I)V=a -org/objectweb/asm/Frame.execute(IILorg/objectweb/asm/ClassWriter;Lorg/objectweb/asm/Item;)V=a -org/objectweb/asm/Frame.merge(Lorg/objectweb/asm/ClassWriter;Lorg/objectweb/asm/Frame;I)Z=a -org/objectweb/asm/Frame.merge(Lorg/objectweb/asm/ClassWriter;I[II)Z=a - -org/objectweb/asm/Handler.remove(Lorg/objectweb/asm/Handler;Lorg/objectweb/asm/Label;Lorg/objectweb/asm/Label;)Lorg/objectweb/asm/Handler;=a - -org/objectweb/asm/MethodWriter.visitSwitchInsn(Lorg/objectweb/asm/Label;[Lorg/objectweb/asm/Label;)V=a -org/objectweb/asm/MethodWriter.addSuccessor(ILorg/objectweb/asm/Label;)V=a -org/objectweb/asm/MethodWriter.getNewOffset([I[III)I=a -org/objectweb/asm/MethodWriter.getSize()I=a -org/objectweb/asm/MethodWriter.put(Lorg/objectweb/asm/ByteVector;)V=a -org/objectweb/asm/MethodWriter.readInt([BI)I=a -org/objectweb/asm/MethodWriter.readShort([BI)S=b -org/objectweb/asm/MethodWriter.readUnsignedShort([BI)I=c -org/objectweb/asm/MethodWriter.writeShort([BII)V=a -org/objectweb/asm/MethodWriter.visitFrame(Lorg/objectweb/asm/Frame;)V=b -org/objectweb/asm/MethodWriter.visitImplicitFirstFrame()V=f -org/objectweb/asm/MethodWriter.startFrame(III)I=a -org/objectweb/asm/MethodWriter.endFrame()V=b -org/objectweb/asm/MethodWriter.writeFrame()V=c -org/objectweb/asm/MethodWriter.resizeInstructions()V=d -org/objectweb/asm/MethodWriter.noSuccessor()V=e -org/objectweb/asm/MethodWriter.writeFrameTypes(II)V=a -org/objectweb/asm/MethodWriter.writeFrameType(Ljava/lang/Object;)V=a -org/objectweb/asm/MethodWriter.getNewOffset([I[ILorg/objectweb/asm/Label;)V=a - -org/objectweb/asm/Type.getType([CI)Lorg/objectweb/asm/Type;=a -org/objectweb/asm/Type.getDescriptor(Ljava/lang/StringBuffer;)V=a -org/objectweb/asm/Type.getDescriptor(Ljava/lang/StringBuffer;Ljava/lang/Class;)V=a - -org/objectweb/asm/signature/SignatureReader.parseType(Ljava/lang/String;ILorg/objectweb/asm/signature/SignatureVisitor;)I=a - -org/objectweb/asm/signature/SignatureWriter.endFormals()V=a -org/objectweb/asm/signature/SignatureWriter.endArguments()V=b - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureReader.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureReader.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureReader.java index b5b2c45..878cd8d 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureReader.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureReader.java @@ -60,10 +60,10 @@ public class SignatureReader { * constructor (see {@link #SignatureReader(String) SignatureReader}). This * method is intended to be called on a {@link SignatureReader} that was * created using a <i>ClassSignature</i> (such as the <code>signature</code> - * parameter of the {@link org.apache.tapestry5.internal.plastic.asm.ClassVisitor#visit + * parameter of the {@link org.objectweb.asm.ClassVisitor#visit * ClassVisitor.visit} method) or a <i>MethodTypeSignature</i> (such as the * <code>signature</code> parameter of the - * {@link org.apache.tapestry5.internal.plastic.asm.ClassVisitor#visitMethod + * {@link org.objectweb.asm.ClassVisitor#visitMethod * ClassVisitor.visitMethod} method). * * @param v @@ -119,8 +119,8 @@ public class SignatureReader { * method is intended to be called on a {@link SignatureReader} that was * created using a <i>FieldTypeSignature</i>, such as the * <code>signature</code> parameter of the - * {@link org.apache.tapestry5.internal.plastic.asm.ClassVisitor#visitField ClassVisitor.visitField} - * or {@link org.apache.tapestry5.internal.plastic.asm.MethodVisitor#visitLocalVariable + * {@link org.objectweb.asm.ClassVisitor#visitField ClassVisitor.visitField} + * or {@link org.objectweb.asm.MethodVisitor#visitLocalVariable * MethodVisitor.visitLocalVariable} methods. * * @param v http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureVisitor.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureVisitor.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureVisitor.java index 04446b5..4277ade 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureVisitor.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureVisitor.java @@ -73,7 +73,7 @@ public abstract class SignatureVisitor { /** * The ASM API version implemented by this visitor. The value of this field - * must be one of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}. + * must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}. */ protected final int api; @@ -82,10 +82,10 @@ public abstract class SignatureVisitor { * * @param api * the ASM API version implemented by this visitor. Must be one - * of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}. + * of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}. */ public SignatureVisitor(final int api) { - if (api != Opcodes.ASM4 && api != Opcodes.ASM5) { + if (api < Opcodes.ASM4 || api > Opcodes.ASM6) { throw new IllegalArgumentException(); } this.api = api; http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureWriter.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureWriter.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureWriter.java index d1e6bac..8d98cd1 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureWriter.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/SignatureWriter.java @@ -40,9 +40,9 @@ import org.apache.tapestry5.internal.plastic.asm.Opcodes; public class SignatureWriter extends SignatureVisitor { /** - * Buffer used to construct the signature. + * Builder used to construct the signature. */ - private final StringBuffer buf = new StringBuffer(); + private final StringBuilder buf = new StringBuilder(); /** * Indicates if the signature contains formal type parameters. @@ -66,7 +66,7 @@ public class SignatureWriter extends SignatureVisitor { * Constructs a new {@link SignatureWriter} object. */ public SignatureWriter() { - super(Opcodes.ASM5); + super(Opcodes.ASM6); } // ------------------------------------------------------------------------ http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/AbstractInsnNode.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/AbstractInsnNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/AbstractInsnNode.java index b68c9b5..a6a01d6 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/AbstractInsnNode.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/AbstractInsnNode.java @@ -134,7 +134,7 @@ public abstract class AbstractInsnNode { * number nodes). This list is a list of {@link TypeAnnotationNode} objects. * May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.TypeAnnotationNode + * @associates org.objectweb.asm.tree.TypeAnnotationNode * @label visible */ public List<TypeAnnotationNode> visibleTypeAnnotations; @@ -145,7 +145,7 @@ public abstract class AbstractInsnNode { * number nodes). This list is a list of {@link TypeAnnotationNode} objects. * May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.TypeAnnotationNode + * @associates org.objectweb.asm.tree.TypeAnnotationNode * @label invisible */ public List<TypeAnnotationNode> invisibleTypeAnnotations; http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/AnnotationNode.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/AnnotationNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/AnnotationNode.java index 3fb7344..c25ab8c 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/AnnotationNode.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/AnnotationNode.java @@ -36,7 +36,7 @@ import org.apache.tapestry5.internal.plastic.asm.AnnotationVisitor; import org.apache.tapestry5.internal.plastic.asm.Opcodes; /** - * A node that represents an annotationn. + * A node that represents an annotation. * * @author Eric Bruneton */ @@ -52,8 +52,8 @@ public class AnnotationNode extends AnnotationVisitor { * as two consecutive elements in the list. The name is a {@link String}, * and the value may be a {@link Byte}, {@link Boolean}, {@link Character}, * {@link Short}, {@link Integer}, {@link Long}, {@link Float}, - * {@link Double}, {@link String} or {@link org.apache.tapestry5.internal.plastic.asm.Type}, or an - * two elements String array (for enumeration values), a + * {@link Double}, {@link String} or {@link org.objectweb.asm.Type}, or a + * two elements String array (for enumeration values), an * {@link AnnotationNode}, or a {@link List} of values of one of the * preceding types. The list may be <tt>null</tt> if there is no name value * pair. @@ -71,7 +71,7 @@ public class AnnotationNode extends AnnotationVisitor { * If a subclass calls this constructor. */ public AnnotationNode(final String desc) { - this(Opcodes.ASM5, desc); + this(Opcodes.ASM6, desc); if (getClass() != AnnotationNode.class) { throw new IllegalStateException(); } @@ -82,7 +82,7 @@ public class AnnotationNode extends AnnotationVisitor { * * @param api * the ASM API version implemented by this visitor. Must be one - * of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}. + * of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}. * @param desc * the class descriptor of the annotation class. */ @@ -98,7 +98,7 @@ public class AnnotationNode extends AnnotationVisitor { * where the visited values must be stored. */ AnnotationNode(final List<Object> values) { - super(Opcodes.ASM5); + super(Opcodes.ASM6); this.values = values; } @@ -114,7 +114,65 @@ public class AnnotationNode extends AnnotationVisitor { if (this.desc != null) { values.add(name); } - values.add(value); + if (value instanceof byte[]) { + byte[] v = (byte[]) value; + ArrayList<Byte> l = new ArrayList<Byte>(v.length); + for (byte b : v) { + l.add(b); + } + values.add(l); + } else if (value instanceof boolean[]) { + boolean[] v = (boolean[]) value; + ArrayList<Boolean> l = new ArrayList<Boolean>(v.length); + for (boolean b : v) { + l.add(b); + } + values.add(l); + } else if (value instanceof short[]) { + short[] v = (short[]) value; + ArrayList<Short> l = new ArrayList<Short>(v.length); + for (short s : v) { + l.add(s); + } + values.add(l); + } else if (value instanceof char[]) { + char[] v = (char[]) value; + ArrayList<Character> l = new ArrayList<Character>(v.length); + for (char c : v) { + l.add(c); + } + values.add(l); + } else if (value instanceof int[]) { + int[] v = (int[]) value; + ArrayList<Integer> l = new ArrayList<Integer>(v.length); + for (int i : v) { + l.add(i); + } + values.add(l); + } else if (value instanceof long[]) { + long[] v = (long[]) value; + ArrayList<Long> l = new ArrayList<Long>(v.length); + for (long lng : v) { + l.add(lng); + } + values.add(l); + } else if (value instanceof float[]) { + float[] v = (float[]) value; + ArrayList<Float> l = new ArrayList<Float>(v.length); + for (float f : v) { + l.add(f); + } + values.add(l); + } else if (value instanceof double[]) { + double[] v = (double[]) value; + ArrayList<Double> l = new ArrayList<Double>(v.length); + for (double d : v) { + l.add(d); + } + values.add(l); + } else { + values.add(value); + } } @Override @@ -171,8 +229,8 @@ public class AnnotationNode extends AnnotationVisitor { * versions of the ASM API than the given version. * * @param api - * an ASM API version. Must be one of {@link Opcodes#ASM4} or - * {@link Opcodes#ASM5}. + * an ASM API version. Must be one of {@link Opcodes#ASM4}, + * {@link Opcodes#ASM5} or {@link Opcodes#ASM6}. */ public void check(final int api) { // nothing to do @@ -230,10 +288,4 @@ public class AnnotationNode extends AnnotationVisitor { } } } - - @Override - public String toString() { - return "AnnotationNode [desc=" + desc + ", values=" + values + "]"; - } - } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ClassNode.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ClassNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ClassNode.java index bf52334..386161c 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ClassNode.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/ClassNode.java @@ -38,6 +38,7 @@ import org.apache.tapestry5.internal.plastic.asm.Attribute; import org.apache.tapestry5.internal.plastic.asm.ClassVisitor; import org.apache.tapestry5.internal.plastic.asm.FieldVisitor; import org.apache.tapestry5.internal.plastic.asm.MethodVisitor; +import org.apache.tapestry5.internal.plastic.asm.ModuleVisitor; import org.apache.tapestry5.internal.plastic.asm.Opcodes; import org.apache.tapestry5.internal.plastic.asm.TypePath; @@ -54,14 +55,14 @@ public class ClassNode extends ClassVisitor { public int version; /** - * The class's access flags (see {@link org.apache.tapestry5.internal.plastic.asm.Opcodes}). This + * The class's access flags (see {@link org.objectweb.asm.Opcodes}). This * field also indicates if the class is deprecated. */ public int access; /** * The internal name of the class (see - * {@link org.apache.tapestry5.internal.plastic.asm.Type#getInternalName() getInternalName}). + * {@link org.objectweb.asm.Type#getInternalName() getInternalName}). */ public String name; @@ -72,7 +73,7 @@ public class ClassNode extends ClassVisitor { /** * The internal of name of the super class (see - * {@link org.apache.tapestry5.internal.plastic.asm.Type#getInternalName() getInternalName}). For + * {@link org.objectweb.asm.Type#getInternalName() getInternalName}). For * interfaces, the super class is {@link Object}. May be <tt>null</tt>, but * only for the {@link Object} class. */ @@ -80,7 +81,7 @@ public class ClassNode extends ClassVisitor { /** * The internal names of the class's interfaces (see - * {@link org.apache.tapestry5.internal.plastic.asm.Type#getInternalName() getInternalName}). This + * {@link org.objectweb.asm.Type#getInternalName() getInternalName}). This * list is a list of {@link String} objects. */ public List<String> interfaces; @@ -98,6 +99,11 @@ public class ClassNode extends ClassVisitor { public String sourceDebug; /** + * Module information. May be <tt>null</tt>. + */ + public ModuleNode module; + + /** * The internal name of the enclosing class of the class. May be * <tt>null</tt>. */ @@ -119,7 +125,7 @@ public class ClassNode extends ClassVisitor { * The runtime visible annotations of this class. This list is a list of * {@link AnnotationNode} objects. May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.AnnotationNode + * @associates org.objectweb.asm.tree.AnnotationNode * @label visible */ public List<AnnotationNode> visibleAnnotations; @@ -128,7 +134,7 @@ public class ClassNode extends ClassVisitor { * The runtime invisible annotations of this class. This list is a list of * {@link AnnotationNode} objects. May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.AnnotationNode + * @associates org.objectweb.asm.tree.AnnotationNode * @label invisible */ public List<AnnotationNode> invisibleAnnotations; @@ -137,7 +143,7 @@ public class ClassNode extends ClassVisitor { * The runtime visible type annotations of this class. This list is a list * of {@link TypeAnnotationNode} objects. May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.TypeAnnotationNode + * @associates org.objectweb.asm.tree.TypeAnnotationNode * @label visible */ public List<TypeAnnotationNode> visibleTypeAnnotations; @@ -146,7 +152,7 @@ public class ClassNode extends ClassVisitor { * The runtime invisible type annotations of this class. This list is a list * of {@link TypeAnnotationNode} objects. May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.TypeAnnotationNode + * @associates org.objectweb.asm.tree.TypeAnnotationNode * @label invisible */ public List<TypeAnnotationNode> invisibleTypeAnnotations; @@ -155,7 +161,7 @@ public class ClassNode extends ClassVisitor { * The non standard attributes of this class. This list is a list of * {@link Attribute} objects. May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.Attribute + * @associates org.objectweb.asm.Attribute */ public List<Attribute> attrs; @@ -163,7 +169,7 @@ public class ClassNode extends ClassVisitor { * Informations about the inner classes of this class. This list is a list * of {@link InnerClassNode} objects. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.InnerClassNode + * @associates org.objectweb.asm.tree.InnerClassNode */ public List<InnerClassNode> innerClasses; @@ -171,7 +177,7 @@ public class ClassNode extends ClassVisitor { * The fields of this class. This list is a list of {@link FieldNode} * objects. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.FieldNode + * @associates org.objectweb.asm.tree.FieldNode */ public List<FieldNode> fields; @@ -179,7 +185,7 @@ public class ClassNode extends ClassVisitor { * The methods of this class. This list is a list of {@link MethodNode} * objects. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.MethodNode + * @associates org.objectweb.asm.tree.MethodNode */ public List<MethodNode> methods; @@ -192,7 +198,7 @@ public class ClassNode extends ClassVisitor { * If a subclass calls this constructor. */ public ClassNode() { - this(Opcodes.ASM5); + this(Opcodes.ASM6); if (getClass() != ClassNode.class) { throw new IllegalStateException(); } @@ -203,7 +209,7 @@ public class ClassNode extends ClassVisitor { * * @param api * the ASM API version implemented by this visitor. Must be one - * of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}. + * of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}. */ public ClassNode(final int api) { super(api); @@ -236,6 +242,12 @@ public class ClassNode extends ClassVisitor { sourceFile = file; sourceDebug = debug; } + + @Override + public ModuleVisitor visitModule(final String name, final int access, + final String version) { + return module = new ModuleNode(name, access, version); + } @Override public void visitOuterClass(final String owner, final String name, @@ -329,11 +341,16 @@ public class ClassNode extends ClassVisitor { * API than the given version. * * @param api - * an ASM API version. Must be one of {@link Opcodes#ASM4} or - * {@link Opcodes#ASM5}. + * an ASM API version. Must be one of {@link Opcodes#ASM4}, + * {@link Opcodes#ASM5} or {@link Opcodes#ASM6}. */ public void check(final int api) { - if (api == Opcodes.ASM4) { + if (api < Opcodes.ASM6) { + if (module != null) { + throw new RuntimeException(); + } + } + if (api < Opcodes.ASM5) { if (visibleTypeAnnotations != null && visibleTypeAnnotations.size() > 0) { throw new RuntimeException(); @@ -342,12 +359,31 @@ public class ClassNode extends ClassVisitor { && invisibleTypeAnnotations.size() > 0) { throw new RuntimeException(); } - for (FieldNode f : fields) { - f.check(api); - } - for (MethodNode m : methods) { - m.check(api); - } + } + // checks attributes + int i, n; + n = visibleAnnotations == null ? 0 : visibleAnnotations.size(); + for (i = 0; i < n; ++i) { + visibleAnnotations.get(i).check(api); + } + n = invisibleAnnotations == null ? 0 : invisibleAnnotations.size(); + for (i = 0; i < n; ++i) { + invisibleAnnotations.get(i).check(api); + } + n = visibleTypeAnnotations == null ? 0 : visibleTypeAnnotations.size(); + for (i = 0; i < n; ++i) { + visibleTypeAnnotations.get(i).check(api); + } + n = invisibleTypeAnnotations == null ? 0 : invisibleTypeAnnotations + .size(); + for (i = 0; i < n; ++i) { + invisibleTypeAnnotations.get(i).check(api); + } + for (FieldNode f : fields) { + f.check(api); + } + for (MethodNode m : methods) { + m.check(api); } } @@ -366,6 +402,10 @@ public class ClassNode extends ClassVisitor { if (sourceFile != null || sourceDebug != null) { cv.visitSource(sourceFile, sourceDebug); } + // visits module + if (module != null) { + module.accept(cv); + } // visits outer class if (outerClass != null) { cv.visitOuterClass(outerClass, outerMethod, outerMethodDesc); @@ -414,10 +454,4 @@ public class ClassNode extends ClassVisitor { // visits end cv.visitEnd(); } - - @Override - public String toString() { - return "ClassNode [name=" + name + "]"; - } - } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/FieldInsnNode.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/FieldInsnNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/FieldInsnNode.java index 848d05d..075519e 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/FieldInsnNode.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/FieldInsnNode.java @@ -43,7 +43,7 @@ public class FieldInsnNode extends AbstractInsnNode { /** * The internal name of the field's owner class (see - * {@link org.apache.tapestry5.internal.plastic.asm.Type#getInternalName() getInternalName}). + * {@link org.objectweb.asm.Type#getInternalName() getInternalName}). */ public String owner; @@ -53,7 +53,7 @@ public class FieldInsnNode extends AbstractInsnNode { public String name; /** - * The field's descriptor (see {@link org.apache.tapestry5.internal.plastic.asm.Type}). + * The field's descriptor (see {@link org.objectweb.asm.Type}). */ public String desc; @@ -65,12 +65,12 @@ public class FieldInsnNode extends AbstractInsnNode { * opcode must be GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD. * @param owner * the internal name of the field's owner class (see - * {@link org.apache.tapestry5.internal.plastic.asm.Type#getInternalName() + * {@link org.objectweb.asm.Type#getInternalName() * getInternalName}). * @param name * the field's name. * @param desc - * the field's descriptor (see {@link org.apache.tapestry5.internal.plastic.asm.Type}). + * the field's descriptor (see {@link org.objectweb.asm.Type}). */ public FieldInsnNode(final int opcode, final String owner, final String name, final String desc) { http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/FieldNode.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/FieldNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/FieldNode.java index 35f3766..b4e08d8 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/FieldNode.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/FieldNode.java @@ -47,7 +47,7 @@ import org.apache.tapestry5.internal.plastic.asm.TypePath; public class FieldNode extends FieldVisitor { /** - * The field's access flags (see {@link org.apache.tapestry5.internal.plastic.asm.Opcodes}). This + * The field's access flags (see {@link org.objectweb.asm.Opcodes}). This * field also indicates if the field is synthetic and/or deprecated. */ public int access; @@ -58,7 +58,7 @@ public class FieldNode extends FieldVisitor { public String name; /** - * The field's descriptor (see {@link org.apache.tapestry5.internal.plastic.asm.Type}). + * The field's descriptor (see {@link org.objectweb.asm.Type}). */ public String desc; @@ -78,7 +78,7 @@ public class FieldNode extends FieldVisitor { * The runtime visible annotations of this field. This list is a list of * {@link AnnotationNode} objects. May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.AnnotationNode + * @associates org.objectweb.asm.tree.AnnotationNode * @label visible */ public List<AnnotationNode> visibleAnnotations; @@ -87,7 +87,7 @@ public class FieldNode extends FieldVisitor { * The runtime invisible annotations of this field. This list is a list of * {@link AnnotationNode} objects. May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.AnnotationNode + * @associates org.objectweb.asm.tree.AnnotationNode * @label invisible */ public List<AnnotationNode> invisibleAnnotations; @@ -96,7 +96,7 @@ public class FieldNode extends FieldVisitor { * The runtime visible type annotations of this field. This list is a list * of {@link TypeAnnotationNode} objects. May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.TypeAnnotationNode + * @associates org.objectweb.asm.tree.TypeAnnotationNode * @label visible */ public List<TypeAnnotationNode> visibleTypeAnnotations; @@ -105,7 +105,7 @@ public class FieldNode extends FieldVisitor { * The runtime invisible type annotations of this field. This list is a list * of {@link TypeAnnotationNode} objects. May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.tree.TypeAnnotationNode + * @associates org.objectweb.asm.tree.TypeAnnotationNode * @label invisible */ public List<TypeAnnotationNode> invisibleTypeAnnotations; @@ -114,7 +114,7 @@ public class FieldNode extends FieldVisitor { * The non standard attributes of this field. This list is a list of * {@link Attribute} objects. May be <tt>null</tt>. * - * @associates org.apache.tapestry5.internal.plastic.asm.Attribute + * @associates org.objectweb.asm.Attribute */ public List<Attribute> attrs; @@ -125,12 +125,12 @@ public class FieldNode extends FieldVisitor { * * @param access * the field's access flags (see - * {@link org.apache.tapestry5.internal.plastic.asm.Opcodes}). This parameter also + * {@link org.objectweb.asm.Opcodes}). This parameter also * indicates if the field is synthetic and/or deprecated. * @param name * the field's name. * @param desc - * the field's descriptor (see {@link org.apache.tapestry5.internal.plastic.asm.Type + * the field's descriptor (see {@link org.objectweb.asm.Type * Type}). * @param signature * the field's signature. @@ -144,7 +144,7 @@ public class FieldNode extends FieldVisitor { */ public FieldNode(final int access, final String name, final String desc, final String signature, final Object value) { - this(Opcodes.ASM5, access, name, desc, signature, value); + this(Opcodes.ASM6, access, name, desc, signature, value); if (getClass() != FieldNode.class) { throw new IllegalStateException(); } @@ -159,12 +159,12 @@ public class FieldNode extends FieldVisitor { * of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}. * @param access * the field's access flags (see - * {@link org.apache.tapestry5.internal.plastic.asm.Opcodes}). This parameter also + * {@link org.objectweb.asm.Opcodes}). This parameter also * indicates if the field is synthetic and/or deprecated. * @param name * the field's name. * @param desc - * the field's descriptor (see {@link org.apache.tapestry5.internal.plastic.asm.Type + * the field's descriptor (see {@link org.objectweb.asm.Type * Type}). * @param signature * the field's signature. @@ -247,8 +247,8 @@ public class FieldNode extends FieldVisitor { * API than the given version. * * @param api - * an ASM API version. Must be one of {@link Opcodes#ASM4} or - * {@link Opcodes#ASM5}. + * an ASM API version. Must be one of {@link Opcodes#ASM4}, + * {@link Opcodes#ASM5} or {@link Opcodes#ASM6}. */ public void check(final int api) { if (api == Opcodes.ASM4) { http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InnerClassNode.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InnerClassNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InnerClassNode.java index 877430f..e3eb5db 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InnerClassNode.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InnerClassNode.java @@ -40,13 +40,13 @@ public class InnerClassNode { /** * The internal name of an inner class (see - * {@link org.apache.tapestry5.internal.plastic.asm.Type#getInternalName() getInternalName}). + * {@link org.objectweb.asm.Type#getInternalName() getInternalName}). */ public String name; /** * The internal name of the class to which the inner class belongs (see - * {@link org.apache.tapestry5.internal.plastic.asm.Type#getInternalName() getInternalName}). May be + * {@link org.objectweb.asm.Type#getInternalName() getInternalName}). May be * <tt>null</tt>. */ public String outerName; @@ -68,11 +68,11 @@ public class InnerClassNode { * * @param name * the internal name of an inner class (see - * {@link org.apache.tapestry5.internal.plastic.asm.Type#getInternalName() + * {@link org.objectweb.asm.Type#getInternalName() * getInternalName}). * @param outerName * the internal name of the class to which the inner class - * belongs (see {@link org.apache.tapestry5.internal.plastic.asm.Type#getInternalName() + * belongs (see {@link org.objectweb.asm.Type#getInternalName() * getInternalName}). May be <tt>null</tt>. * @param innerName * the (simple) name of the inner class inside its enclosing http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InsnList.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InsnList.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InsnList.java index 0a00c4b..f7e4925 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InsnList.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InsnList.java @@ -176,6 +176,9 @@ public class InsnList { /** * Returns an iterator over the instructions in this list. * + * @param index + * index of instruction for the iterator to start at + * * @return an iterator over the instructions in this list. */ @SuppressWarnings("unchecked") @@ -602,14 +605,28 @@ public class InsnList { } public void add(Object o) { - InsnList.this.insertBefore(next, (AbstractInsnNode) o); + if (next != null) { + InsnList.this.insertBefore(next, (AbstractInsnNode) o); + } else if (prev != null) { + InsnList.this.insert(prev, (AbstractInsnNode) o); + } else { + InsnList.this.add((AbstractInsnNode) o); + } prev = (AbstractInsnNode) o; remove = null; } public void set(Object o) { - InsnList.this.set(next.prev, (AbstractInsnNode) o); - prev = (AbstractInsnNode) o; + if (remove != null) { + InsnList.this.set(remove, (AbstractInsnNode) o); + if (remove == prev) { + prev = (AbstractInsnNode) o; + } else { + next = (AbstractInsnNode) o; + } + } else { + throw new IllegalStateException(); + } } } } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InvokeDynamicInsnNode.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InvokeDynamicInsnNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InvokeDynamicInsnNode.java index 2578768..21fb269 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InvokeDynamicInsnNode.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InvokeDynamicInsnNode.java @@ -68,7 +68,7 @@ public class InvokeDynamicInsnNode extends AbstractInsnNode { * @param name * invokedynamic name. * @param desc - * invokedynamic descriptor (see {@link org.apache.tapestry5.internal.plastic.asm.Type}). + * invokedynamic descriptor (see {@link org.objectweb.asm.Type}). * @param bsm * the bootstrap method. * @param bsmArgs http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/74324b31/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/LdcInsnNode.java ---------------------------------------------------------------------- diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/LdcInsnNode.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/LdcInsnNode.java index e048e74..458086d 100644 --- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/LdcInsnNode.java +++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/LdcInsnNode.java @@ -44,7 +44,7 @@ public class LdcInsnNode extends AbstractInsnNode { /** * The constant to be loaded on the stack. This parameter must be a non null * {@link Integer}, a {@link Float}, a {@link Long}, a {@link Double}, a - * {@link String} or a {@link org.apache.tapestry5.internal.plastic.asm.Type}. + * {@link String} or a {@link org.objectweb.asm.Type}. */ public Object cst;
