You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/05/30 21:20:36 UTC
[8/17] TAP5-1852: Upgrade Plastic to use ASM 4.0 - Remove unused
utility classes
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/MethodConstantsCollector.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/MethodConstantsCollector.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/MethodConstantsCollector.java
deleted file mode 100644
index 5fc6d34..0000000
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/MethodConstantsCollector.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 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 org.apache.tapestry5.internal.plastic.asm.AnnotationVisitor;
-import org.apache.tapestry5.internal.plastic.asm.Label;
-import org.apache.tapestry5.internal.plastic.asm.MethodAdapter;
-import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
-import org.apache.tapestry5.internal.plastic.asm.Opcodes;
-
-/**
- * An {@link MethodVisitor} that collects the {@link Constant}s of the methods
- * it visits.
- *
- * @author Eric Bruneton
- */
-public class MethodConstantsCollector extends MethodAdapter {
-
- private final ConstantPool cp;
-
- public MethodConstantsCollector(
- final MethodVisitor mv,
- final ConstantPool cp)
- {
- super(mv);
- this.cp = cp;
- }
-
- public AnnotationVisitor visitAnnotationDefault() {
- cp.newUTF8("AnnotationDefault");
- return new AnnotationConstantsCollector(mv.visitAnnotationDefault(), cp);
- }
-
- public AnnotationVisitor visitAnnotation(
- final String desc,
- final boolean visible)
- {
- cp.newUTF8(desc);
- if (visible) {
- cp.newUTF8("RuntimeVisibleAnnotations");
- } else {
- cp.newUTF8("RuntimeInvisibleAnnotations");
- }
- return new AnnotationConstantsCollector(mv.visitAnnotation(desc,
- visible), cp);
- }
-
- public AnnotationVisitor visitParameterAnnotation(
- final int parameter,
- final String desc,
- final boolean visible)
- {
- cp.newUTF8(desc);
- if (visible) {
- cp.newUTF8("RuntimeVisibleParameterAnnotations");
- } else {
- cp.newUTF8("RuntimeInvisibleParameterAnnotations");
- }
- return new AnnotationConstantsCollector(mv.visitParameterAnnotation(parameter,
- desc,
- visible),
- cp);
- }
-
- public void visitTypeInsn(final int opcode, final String type) {
- cp.newClass(type);
- mv.visitTypeInsn(opcode, type);
- }
-
- public void visitFieldInsn(
- final int opcode,
- final String owner,
- final String name,
- final String desc)
- {
- cp.newField(owner, name, desc);
- mv.visitFieldInsn(opcode, owner, name, desc);
- }
-
- public void visitMethodInsn(
- final int opcode,
- final String owner,
- final String name,
- final String desc)
- {
- boolean itf = opcode == Opcodes.INVOKEINTERFACE;
- cp.newMethod(owner, name, desc, itf);
- mv.visitMethodInsn(opcode, owner, name, desc);
- }
-
- public void visitLdcInsn(final Object cst) {
- cp.newConst(cst);
- mv.visitLdcInsn(cst);
- }
-
- public void visitMultiANewArrayInsn(final String desc, final int dims) {
- cp.newClass(desc);
- mv.visitMultiANewArrayInsn(desc, dims);
- }
-
- public void visitTryCatchBlock(
- final Label start,
- final Label end,
- final Label handler,
- final String type)
- {
- if (type != null) {
- cp.newClass(type);
- }
- mv.visitTryCatchBlock(start, end, handler, type);
- }
-
- public void visitLocalVariable(
- final String name,
- final String desc,
- final String signature,
- final Label start,
- final Label end,
- final int index)
- {
- if (signature != null) {
- cp.newUTF8("LocalVariableTypeTable");
- cp.newUTF8(name);
- cp.newUTF8(signature);
- }
- cp.newUTF8("LocalVariableTable");
- cp.newUTF8(name);
- cp.newUTF8(desc);
- mv.visitLocalVariable(name, desc, signature, start, end, index);
- }
-
- public void visitLineNumber(final int line, final Label start) {
- cp.newUTF8("LineNumberTable");
- mv.visitLineNumber(line, start);
- }
-
- public void visitMaxs(final int maxStack, final int maxLocals) {
- cp.newUTF8("Code");
- mv.visitMaxs(maxStack, maxLocals);
- }
-}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/MethodOptimizer.java
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/MethodOptimizer.java b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/MethodOptimizer.java
deleted file mode 100644
index d4d2eac..0000000
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/MethodOptimizer.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 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 org.apache.tapestry5.internal.plastic.asm.AnnotationVisitor;
-import org.apache.tapestry5.internal.plastic.asm.Attribute;
-import org.apache.tapestry5.internal.plastic.asm.Label;
-import org.apache.tapestry5.internal.plastic.asm.MethodAdapter;
-import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
-import org.apache.tapestry5.internal.plastic.asm.commons.Remapper;
-import org.apache.tapestry5.internal.plastic.asm.commons.RemappingMethodAdapter;
-
-/**
- * A {@link MethodAdapter} that renames fields and methods, and removes debug
- * info.
- *
- * @author Eugene Kuleshov
- */
-public class MethodOptimizer extends RemappingMethodAdapter {
-
- public MethodOptimizer(
- int access,
- String desc,
- MethodVisitor mv,
- Remapper remapper)
- {
- super(access, desc, mv, remapper);
- }
-
- // ------------------------------------------------------------------------
- // Overridden methods
- // ------------------------------------------------------------------------
-
- public AnnotationVisitor visitAnnotationDefault() {
- // remove annotations
- return null;
- }
-
- public AnnotationVisitor visitParameterAnnotation(
- final int parameter,
- final String desc,
- final boolean visible)
- {
- // remove annotations
- return null;
- }
-
- public void visitLocalVariable(
- final String name,
- final String desc,
- final String signature,
- final Label start,
- final Label end,
- final int index)
- {
- // remove debug info
- }
-
- public void visitLineNumber(final int line, final Label start) {
- // remove debug info
- }
-
- public void visitFrame(
- int type,
- int local,
- Object[] local2,
- int stack,
- Object[] stack2)
- {
- // remove frame info
- }
-
- public void visitAttribute(Attribute attr) {
- // remove non standard attributes
- }
-}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/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 22f3797..0000000
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/NameMapping.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 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 extends Properties {
-
- public final Set unused;
-
- public NameMapping(final String file) throws IOException {
- InputStream is = null;
- try {
- is = new BufferedInputStream(new FileInputStream(file));
- load(is);
- unused = new HashSet(keySet());
- } finally {
- if (is != null) {
- is.close();
- }
- }
- }
-
- public String map(final String name) {
- String s = (String) 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/d6e5f413/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 f2ddc3f..0000000
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/Shrinker.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/***
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 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.HashSet;
-import java.util.Iterator;
-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.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 Properties MAPPING = new Properties();
-
- public static void main(final String[] args) throws IOException {
- int n = args.length - 1;
- for (int i = 0; i < n - 1; ++i) {
- MAPPING.load(new FileInputStream(args[i]));
- }
- final Set unused = new HashSet(MAPPING.keySet());
-
- File f = new File(args[n - 1]);
- File d = new File(args[n]);
-
- optimize(f, d, new SimpleRemapper(MAPPING) {
- public String map(String key) {
- String s = super.map(key);
- if (s != null) {
- unused.remove(key);
- }
- return s;
- }
- });
-
- Iterator i = unused.iterator();
- while (i.hasNext()) {
- String s = (String) 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));
- ClassWriter cw = new ClassWriter(0);
- ClassConstantsCollector ccc = new ClassConstantsCollector(cw, cp);
- ClassOptimizer co = new ClassOptimizer(ccc, remapper);
- cr.accept(co, ClassReader.SKIP_DEBUG);
-
- Set constants = new TreeSet(new ConstantComparator());
- constants.addAll(cp.values());
-
- cr = new ClassReader(cw.toByteArray());
- cw = new ClassWriter(0);
- Iterator i = constants.iterator();
- while (i.hasNext()) {
- Constant c = (Constant) i.next();
- c.write(cw);
- }
- cr.accept(cw, ClassReader.SKIP_DEBUG);
-
- if (MAPPING.getProperty(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()) {
- g.getParentFile().mkdirs();
- OutputStream os = new FileOutputStream(g);
- os.write(cw.toByteArray());
- os.close();
- }
- }
- }
-
- static class ConstantComparator implements Comparator {
-
- public int compare(final Object o1, final Object o2) {
- Constant c1 = (Constant) o1;
- Constant c2 = (Constant) o2;
- int d = getSort(c1) - getSort(c2);
- if (d == 0) {
- switch (c1.type) {
- case 'I':
- return new Integer(c1.intVal).compareTo(new Integer(c2.intVal));
- case 'J':
- return new Long(c1.longVal).compareTo(new Long(c2.longVal));
- case 'F':
- return new Float(c1.floatVal).compareTo(new Float(c2.floatVal));
- case 'D':
- return new Double(c1.doubleVal).compareTo(new Double(c2.doubleVal));
- case 's':
- case 'S':
- case 'C':
- return c1.strVal1.compareTo(c2.strVal1);
- case 'T':
- d = c1.strVal1.compareTo(c2.strVal1);
- if (d == 0) {
- d = c1.strVal2.compareTo(c2.strVal2);
- }
- break;
- default:
- d = c1.strVal1.compareTo(c2.strVal1);
- if (d == 0) {
- d = c1.strVal2.compareTo(c2.strVal2);
- if (d == 0) {
- d = c1.strVal3.compareTo(c2.strVal3);
- }
- }
- }
- }
- return d;
- }
-
- 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;
- default:
- return 10;
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/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/d6e5f413/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/d6e5f413/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 2b60adc..0000000
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-annotations.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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/d6e5f413/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 9fc50ea..0000000
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-frames.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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/d6e5f413/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 d2672d9..0000000
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-resize.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# 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/d6e5f413/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 b9dfdf5..0000000
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-signatures.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# 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/d6e5f413/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 97e5895..0000000
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink-writer.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-# class mappings
-
-org/objectweb/asm/AnnotationWriter/remove=true
-org/objectweb/asm/ByteVector/remove=true
-org/objectweb/asm/ClassAdapter/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/MethodAdapter/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/d6e5f413/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 d9f8fc7..0000000
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/optimizer/shrink.properties
+++ /dev/null
@@ -1,282 +0,0 @@
-# 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
-
-# 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/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.access=j
-org/objectweb/asm/ClassWriter.name=k
-org/objectweb/asm/ClassWriter.signature=l
-org/objectweb/asm/ClassWriter.superName=m
-org/objectweb/asm/ClassWriter.interfaceCount=n
-org/objectweb/asm/ClassWriter.interfaces=o
-org/objectweb/asm/ClassWriter.sourceFile=p
-org/objectweb/asm/ClassWriter.sourceDebug=q
-org/objectweb/asm/ClassWriter.enclosingMethodOwner=r
-org/objectweb/asm/ClassWriter.enclosingMethod=s
-org/objectweb/asm/ClassWriter.anns=t
-org/objectweb/asm/ClassWriter.ianns=u
-org/objectweb/asm/ClassWriter.attrs=v
-org/objectweb/asm/ClassWriter.innerClassesCount=w
-org/objectweb/asm/ClassWriter.innerClasses=x
-org/objectweb/asm/ClassWriter.firstField=y
-org/objectweb/asm/ClassWriter.lastField=z
-org/objectweb/asm/ClassWriter.firstMethod=A
-org/objectweb/asm/ClassWriter.lastMethod=B
-org/objectweb/asm/ClassWriter.computeMaxs=C
-org/objectweb/asm/ClassWriter.typeCount=D
-org/objectweb/asm/ClassWriter.typeTable=E
-org/objectweb/asm/ClassWriter.thisName=F
-org/objectweb/asm/ClassWriter.computeFrames=G
-org/objectweb/asm/ClassWriter.computeMaxs=H
-org/objectweb/asm/ClassWriter.invalidFrames=I
-org/objectweb/asm/ClassWriter.cr=J
-
-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.next=a
-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.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.next=a
-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.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.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.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.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/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/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/ClassReader.copyPool(Lorg/objectweb/asm/ClassWriter;)V=a
-org/objectweb/asm/ClassReader.readAnnotationValue(I[CLjava/lang/String;Lorg/objectweb/asm/AnnotationVisitor;)I=a
-org/objectweb/asm/ClassReader.readAnnotationValues(I[CZLorg/objectweb/asm/AnnotationVisitor;)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;)[B=a
-org/objectweb/asm/ClassReader.readParameterAnnotations(ILjava/lang/String;[CZLorg/objectweb/asm/MethodVisitor;)V=a
-org/objectweb/asm/ClassReader.readUTF(II[C)Ljava/lang/String;=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.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/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/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/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.startFrame(III)V=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/d6e5f413/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/package.html
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/package.html b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/package.html
index 4362fe5..2d4a765 100644
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/package.html
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/package.html
@@ -1,7 +1,7 @@
<html>
<!--
* ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2005 INRIA, France Telecom
+ * Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,14 +33,15 @@ Provides a small and fast bytecode manipulation framework.
<p>
The <a href="http://www.objectweb.org/asm">ASM</a> framework is organized
-around the {@link org.objectweb.asm.ClassVisitor ClassVisitor},
-{@link org.objectweb.asm.FieldVisitor FieldVisitor} and
-{@link org.objectweb.asm.MethodVisitor MethodVisitor} interfaces, which allow
-one to visit the fields and methods of a class, including the bytecode
-instructions of each method.
+around the {@link org.objectweb.asm.ClassVisitor ClassVisitor},
+{@link org.objectweb.asm.FieldVisitor FieldVisitor},
+{@link org.objectweb.asm.MethodVisitor MethodVisitor} and
+{@link org.objectweb.asm.AnnotationVisitor AnnotationVisitor} abstract classes,
+which allow one to visit the fields, methods and annotations of a class,
+including the bytecode instructions of each method.
<p>
-In addition to these main interfaces, ASM provides a {@link
+In addition to these main abstract classes, ASM provides a {@link
org.objectweb.asm.ClassReader ClassReader} class, that can parse an
existing class and make a given visitor visit it. ASM also provides
a {@link org.objectweb.asm.ClassWriter ClassWriter} class, which is
@@ -49,7 +50,7 @@ a visitor that generates Java class files.
<p>
In order to generate a class from scratch, only the {@link
org.objectweb.asm.ClassWriter ClassWriter} class is necessary. Indeed,
-in order to generate a class, one must just call its visit<i>XXX</i>
+in order to generate a class, one must just call its visit<i>Xxx</i>
methods with the appropriate arguments to generate the desired fields
and methods. See the "helloworld" example in the ASM distribution for
more details about class generation.
@@ -64,17 +65,16 @@ that delegates most of the work to another {@link org.objectweb.asm.ClassVisitor
ClassVisitor}, but that sometimes changes some parameter values,
or call additional methods, in order to implement the desired
modification process. In order to make it easier to implement such
-class modifiers, ASM provides the {@link org.objectweb.asm.ClassAdapter
-ClassAdapter} and {@link org.objectweb.asm.MethodAdapter MethodAdapter}
-classes, which implement the {@link org.objectweb.asm.ClassVisitor ClassVisitor}
-and {@link org.objectweb.asm.MethodVisitor MethodVisitor} interfaces by
-delegating all work to other visitors. See the "adapt" example in the ASM
+class modifiers, the {@link org.objectweb.asm.ClassVisitor
+ClassVisitor} and {@link org.objectweb.asm.MethodVisitor MethodVisitor}
+classes delegate by default all the method calls they receive to an
+optional visitor. See the "adapt" example in the ASM
distribution for more details about class modification.
<p>
-The size of the core ASM library, <tt>asm.jar</tt>, is only 42KB, which is much
-smaller than the size of the
-<a href="http://jakarta.apache.org/bcel">BCEL</a> library (504KB), and than the
+The size of the core ASM library, <tt>asm.jar</tt>, is only 45KB, which is much
+smaller than the size of the
+<a href="http://jakarta.apache.org/bcel">BCEL</a> library (504KB), and than the
size of the
<a href="http://serp.sourceforge.net">SERP</a> library (150KB). ASM is also
much faster than these tools. Indeed the overhead of a load time class
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/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 cecb916..b72fde6 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
@@ -1,6 +1,6 @@
/***
* ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
+ * Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,7 @@ package org.apache.tapestry5.internal.plastic.asm.signature;
/**
* A type signature parser to make a signature visitor visit an existing
* signature.
- *
+ *
* @author Thomas Hallgren
* @author Eric Bruneton
*/
@@ -45,7 +45,7 @@ public class SignatureReader {
/**
* Constructs a {@link SignatureReader} for the given signature.
- *
+ *
* @param signature A <i>ClassSignature</i>, <i>MethodTypeSignature</i>,
* or <i>FieldTypeSignature</i>.
*/
@@ -65,7 +65,7 @@ public class SignatureReader {
* parameter of the
* {@link org.apache.tapestry5.internal.plastic.asm.ClassVisitor#visitMethod ClassVisitor.visitMethod}
* method).
- *
+ *
* @param v the visitor that must visit this signature.
*/
public void accept(final SignatureVisitor v) {
@@ -118,11 +118,11 @@ 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
+ * {@link org.apache.tapestry5.internal.plastic.asm.ClassVisitor#visitField
+ * ClassVisitor.visitField} or {@link
* org.apache.tapestry5.internal.plastic.asm.MethodVisitor#visitLocalVariable
* MethodVisitor.visitLocalVariable} methods.
- *
+ *
* @param v the visitor that must visit this signature.
*/
public void acceptType(final SignatureVisitor v) {
@@ -131,7 +131,7 @@ public class SignatureReader {
/**
* Parses a field type signature and makes the given visitor visit it.
- *
+ *
* @param signature a string containing the signature that must be parsed.
* @param pos index of the first character of the signature to parsed.
* @param v the visitor that must visit this signature.
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/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 b3bed0f..14e9ccb 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
@@ -1,6 +1,6 @@
/***
* ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
+ * Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,157 +29,200 @@
*/
package org.apache.tapestry5.internal.plastic.asm.signature;
+import org.apache.tapestry5.internal.plastic.asm.Opcodes;
+
/**
* A visitor to visit a generic signature. The methods of this interface must be
* called in one of the three following orders (the last one is the only valid
* order for a {@link SignatureVisitor} that is returned by a method of this
* interface): <ul> <li><i>ClassSignature</i> = (
- * <tt>visitFormalTypeParameter</tt>
+ * <tt>visitFormalTypeParameter</tt>
* <tt>visitClassBound</tt>?
- * <tt>visitInterfaceBound</tt>* )* ( <tt>visitSuperClass</tt>
+ * <tt>visitInterfaceBound</tt>* )* ( <tt>visitSuperClass</tt>
* <tt>visitInterface</tt>* )</li>
- * <li><i>MethodSignature</i> = ( <tt>visitFormalTypeParameter</tt>
+ * <li><i>MethodSignature</i> = ( <tt>visitFormalTypeParameter</tt>
* <tt>visitClassBound</tt>?
* <tt>visitInterfaceBound</tt>* )* ( <tt>visitParameterType</tt>*
- * <tt>visitReturnType</tt>
+ * <tt>visitReturnType</tt>
* <tt>visitExceptionType</tt>* )</li> <li><i>TypeSignature</i> =
* <tt>visitBaseType</tt> | <tt>visitTypeVariable</tt> |
* <tt>visitArrayType</tt> | (
* <tt>visitClassType</tt> <tt>visitTypeArgument</tt>* (
* <tt>visitInnerClassType</tt> <tt>visitTypeArgument</tt>* )*
* <tt>visitEnd</tt> ) )</li> </ul>
- *
+ *
* @author Thomas Hallgren
* @author Eric Bruneton
*/
-public interface SignatureVisitor {
+public abstract class SignatureVisitor {
/**
* Wildcard for an "extends" type argument.
*/
- char EXTENDS = '+';
+ public final static char EXTENDS = '+';
/**
* Wildcard for a "super" type argument.
*/
- char SUPER = '-';
+ public final static char SUPER = '-';
/**
* Wildcard for a normal type argument.
*/
- char INSTANCEOF = '=';
+ public final static char INSTANCEOF = '=';
+
+ /**
+ * The ASM API version implemented by this visitor. The value of this field
+ * must be one of {@link Opcodes#ASM4}.
+ */
+ protected final int api;
+
+ /**
+ * Constructs a new {@link SignatureVisitor}.
+ *
+ * @param api the ASM API version implemented by this visitor. Must be one
+ * of {@link Opcodes#ASM4}.
+ */
+ public SignatureVisitor(final int api) {
+ this.api = api;
+ }
/**
* Visits a formal type parameter.
- *
+ *
* @param name the name of the formal parameter.
*/
- void visitFormalTypeParameter(String name);
+ public void visitFormalTypeParameter(String name) {
+ }
/**
* Visits the class bound of the last visited formal type parameter.
- *
+ *
* @return a non null visitor to visit the signature of the class bound.
*/
- SignatureVisitor visitClassBound();
+ public SignatureVisitor visitClassBound() {
+ return this;
+ }
/**
* Visits an interface bound of the last visited formal type parameter.
- *
+ *
* @return a non null visitor to visit the signature of the interface bound.
*/
- SignatureVisitor visitInterfaceBound();
+ public SignatureVisitor visitInterfaceBound() {
+ return this;
+ }
/**
* Visits the type of the super class.
- *
+ *
* @return a non null visitor to visit the signature of the super class
* type.
*/
- SignatureVisitor visitSuperclass();
+ public SignatureVisitor visitSuperclass() {
+ return this;
+ }
/**
* Visits the type of an interface implemented by the class.
- *
+ *
* @return a non null visitor to visit the signature of the interface type.
*/
- SignatureVisitor visitInterface();
+ public SignatureVisitor visitInterface() {
+ return this;
+ }
/**
* Visits the type of a method parameter.
- *
+ *
* @return a non null visitor to visit the signature of the parameter type.
*/
- SignatureVisitor visitParameterType();
+ public SignatureVisitor visitParameterType() {
+ return this;
+ }
/**
* Visits the return type of the method.
- *
+ *
* @return a non null visitor to visit the signature of the return type.
*/
- SignatureVisitor visitReturnType();
+ public SignatureVisitor visitReturnType() {
+ return this;
+ }
/**
* Visits the type of a method exception.
- *
+ *
* @return a non null visitor to visit the signature of the exception type.
*/
- SignatureVisitor visitExceptionType();
+ public SignatureVisitor visitExceptionType() {
+ return this;
+ }
/**
* Visits a signature corresponding to a primitive type.
- *
+ *
* @param descriptor the descriptor of the primitive type, or 'V' for
* <tt>void</tt>.
*/
- void visitBaseType(char descriptor);
+ public void visitBaseType(char descriptor) {
+ }
/**
* Visits a signature corresponding to a type variable.
- *
+ *
* @param name the name of the type variable.
*/
- void visitTypeVariable(String name);
+ public void visitTypeVariable(String name) {
+ }
/**
* Visits a signature corresponding to an array type.
- *
+ *
* @return a non null visitor to visit the signature of the array element
* type.
*/
- SignatureVisitor visitArrayType();
+ public SignatureVisitor visitArrayType() {
+ return this;
+ }
/**
* Starts the visit of a signature corresponding to a class or interface
* type.
- *
+ *
* @param name the internal name of the class or interface.
*/
- void visitClassType(String name);
+ public void visitClassType(String name) {
+ }
/**
* Visits an inner class.
- *
+ *
* @param name the local name of the inner class in its enclosing class.
*/
- void visitInnerClassType(String name);
+ public void visitInnerClassType(String name) {
+ }
/**
* Visits an unbounded type argument of the last visited class or inner
* class type.
*/
- void visitTypeArgument();
+ public void visitTypeArgument() {
+ }
/**
* Visits a type argument of the last visited class or inner class type.
- *
+ *
* @param wildcard '+', '-' or '='.
* @return a non null visitor to visit the signature of the type argument.
*/
- SignatureVisitor visitTypeArgument(char wildcard);
+ public SignatureVisitor visitTypeArgument(char wildcard) {
+ return this;
+ }
/**
* Ends the visit of a signature corresponding to a class or interface type.
*/
- void visitEnd();
+ public void visitEnd() {
+ }
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/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 4cf29bd..841fdad 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
@@ -1,6 +1,6 @@
/***
* ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
+ * Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,15 @@
*/
package org.apache.tapestry5.internal.plastic.asm.signature;
+import org.apache.tapestry5.internal.plastic.asm.Opcodes;
+
/**
* A signature visitor that generates signatures in string format.
- *
+ *
* @author Thomas Hallgren
* @author Eric Bruneton
*/
-public class SignatureWriter implements SignatureVisitor {
+public class SignatureWriter extends SignatureVisitor {
/**
* Buffer used to construct the signature.
@@ -64,12 +66,14 @@ public class SignatureWriter implements SignatureVisitor {
* Constructs a new {@link SignatureWriter} object.
*/
public SignatureWriter() {
+ super(Opcodes.ASM4);
}
// ------------------------------------------------------------------------
// Implementation of the SignatureVisitor interface
// ------------------------------------------------------------------------
+ @Override
public void visitFormalTypeParameter(final String name) {
if (!hasFormals) {
hasFormals = true;
@@ -79,24 +83,29 @@ public class SignatureWriter implements SignatureVisitor {
buf.append(':');
}
+ @Override
public SignatureVisitor visitClassBound() {
return this;
}
+ @Override
public SignatureVisitor visitInterfaceBound() {
buf.append(':');
return this;
}
+ @Override
public SignatureVisitor visitSuperclass() {
endFormals();
return this;
}
+ @Override
public SignatureVisitor visitInterface() {
return this;
}
+ @Override
public SignatureVisitor visitParameterType() {
endFormals();
if (!hasParameters) {
@@ -106,6 +115,7 @@ public class SignatureWriter implements SignatureVisitor {
return this;
}
+ @Override
public SignatureVisitor visitReturnType() {
endFormals();
if (!hasParameters) {
@@ -115,32 +125,38 @@ public class SignatureWriter implements SignatureVisitor {
return this;
}
+ @Override
public SignatureVisitor visitExceptionType() {
buf.append('^');
return this;
}
+ @Override
public void visitBaseType(final char descriptor) {
buf.append(descriptor);
}
+ @Override
public void visitTypeVariable(final String name) {
buf.append('T');
buf.append(name);
buf.append(';');
}
+ @Override
public SignatureVisitor visitArrayType() {
buf.append('[');
return this;
}
+ @Override
public void visitClassType(final String name) {
buf.append('L');
buf.append(name);
argumentStack *= 2;
}
+ @Override
public void visitInnerClassType(final String name) {
endArguments();
buf.append('.');
@@ -148,6 +164,7 @@ public class SignatureWriter implements SignatureVisitor {
argumentStack *= 2;
}
+ @Override
public void visitTypeArgument() {
if (argumentStack % 2 == 0) {
++argumentStack;
@@ -156,6 +173,7 @@ public class SignatureWriter implements SignatureVisitor {
buf.append('*');
}
+ @Override
public SignatureVisitor visitTypeArgument(final char wildcard) {
if (argumentStack % 2 == 0) {
++argumentStack;
@@ -167,6 +185,7 @@ public class SignatureWriter implements SignatureVisitor {
return this;
}
+ @Override
public void visitEnd() {
endArguments();
buf.append(';');
@@ -174,9 +193,10 @@ public class SignatureWriter implements SignatureVisitor {
/**
* Returns the signature that was built by this signature writer.
- *
+ *
* @return the signature that was built by this signature writer.
*/
+ @Override
public String toString() {
return buf.toString();
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/package.html
----------------------------------------------------------------------
diff --git a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/package.html b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/package.html
index 21f103a..0c07d12 100644
--- a/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/package.html
+++ b/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/signature/package.html
@@ -1,7 +1,7 @@
<html>
<!--
* ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2005 INRIA, France Telecom
+ * Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/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 6f84382..32dc008 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
@@ -1,6 +1,6 @@
/***
* ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
+ * Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,15 +29,15 @@
*/
package org.apache.tapestry5.internal.plastic.asm.tree;
+import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
+
import java.util.List;
import java.util.Map;
-import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
-
/**
* A node that represents a bytecode instruction. <i>An instruction can appear
* at most once in at most one {@link InsnList} at a time</i>.
- *
+ *
* @author Eric Bruneton
*/
public abstract class AbstractInsnNode {
@@ -73,49 +73,54 @@ public abstract class AbstractInsnNode {
public static final int METHOD_INSN = 5;
/**
+ * The type of {@link InvokeDynamicInsnNode} instructions.
+ */
+ public static final int INVOKE_DYNAMIC_INSN = 6;
+
+ /**
* The type of {@link JumpInsnNode} instructions.
*/
- public static final int JUMP_INSN = 6;
+ public static final int JUMP_INSN = 7;
/**
* The type of {@link LabelNode} "instructions".
*/
- public static final int LABEL = 7;
+ public static final int LABEL = 8;
/**
* The type of {@link LdcInsnNode} instructions.
*/
- public static final int LDC_INSN = 8;
+ public static final int LDC_INSN = 9;
/**
* The type of {@link IincInsnNode} instructions.
*/
- public static final int IINC_INSN = 9;
+ public static final int IINC_INSN = 10;
/**
* The type of {@link TableSwitchInsnNode} instructions.
*/
- public static final int TABLESWITCH_INSN = 10;
+ public static final int TABLESWITCH_INSN = 11;
/**
* The type of {@link LookupSwitchInsnNode} instructions.
*/
- public static final int LOOKUPSWITCH_INSN = 11;
+ public static final int LOOKUPSWITCH_INSN = 12;
/**
* The type of {@link MultiANewArrayInsnNode} instructions.
*/
- public static final int MULTIANEWARRAY_INSN = 12;
+ public static final int MULTIANEWARRAY_INSN = 13;
/**
* The type of {@link FrameNode} "instructions".
*/
- public static final int FRAME = 13;
+ public static final int FRAME = 14;
/**
* The type of {@link LineNumberNode} "instructions".
*/
- public static final int LINE = 14;
+ public static final int LINE = 15;
/**
* The opcode of this instruction.
@@ -142,7 +147,7 @@ public abstract class AbstractInsnNode {
/**
* Constructs a new {@link AbstractInsnNode}.
- *
+ *
* @param opcode the opcode of the instruction to be constructed.
*/
protected AbstractInsnNode(final int opcode) {
@@ -152,7 +157,7 @@ public abstract class AbstractInsnNode {
/**
* Returns the opcode of this instruction.
- *
+ *
* @return the opcode of this instruction.
*/
public int getOpcode() {
@@ -161,7 +166,7 @@ public abstract class AbstractInsnNode {
/**
* Returns the type of this instruction.
- *
+ *
* @return the type of this instruction, i.e. one the constants defined in
* this class.
*/
@@ -170,7 +175,7 @@ public abstract class AbstractInsnNode {
/**
* Returns the previous instruction in the list to which this instruction
* belongs, if any.
- *
+ *
* @return the previous instruction in the list to which this instruction
* belongs, if any. May be <tt>null</tt>.
*/
@@ -181,7 +186,7 @@ public abstract class AbstractInsnNode {
/**
* Returns the next instruction in the list to which this instruction
* belongs, if any.
- *
+ *
* @return the next instruction in the list to which this instruction
* belongs, if any. May be <tt>null</tt>.
*/
@@ -191,42 +196,42 @@ public abstract class AbstractInsnNode {
/**
* Makes the given code visitor visit this instruction.
- *
+ *
* @param cv a code visitor.
*/
public abstract void accept(final MethodVisitor cv);
/**
* Returns a copy of this instruction.
- *
+ *
* @param labels a map from LabelNodes to cloned LabelNodes.
* @return a copy of this instruction. The returned instruction does not
* belong to any {@link InsnList}.
*/
- public abstract AbstractInsnNode clone(final Map labels);
+ public abstract AbstractInsnNode clone(final Map<LabelNode, LabelNode> labels);
/**
* Returns the clone of the given label.
- *
+ *
* @param label a label.
* @param map a map from LabelNodes to cloned LabelNodes.
* @return the clone of the given label.
*/
- static LabelNode clone(final LabelNode label, final Map map) {
- return (LabelNode) map.get(label);
+ static LabelNode clone(final LabelNode label, final Map<LabelNode, LabelNode> map) {
+ return map.get(label);
}
/**
* Returns the clones of the given labels.
- *
+ *
* @param labels a list of labels.
* @param map a map from LabelNodes to cloned LabelNodes.
* @return the clones of the given labels.
*/
- static LabelNode[] clone(final List labels, final Map map) {
+ static LabelNode[] clone(final List<LabelNode> labels, final Map<LabelNode, LabelNode> map) {
LabelNode[] clones = new LabelNode[labels.size()];
for (int i = 0; i < clones.length; ++i) {
- clones[i] = (LabelNode) map.get(labels.get(i));
+ clones[i] = map.get(labels.get(i));
}
return clones;
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/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 be05edd..2fe5b77 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
@@ -1,6 +1,6 @@
/***
* ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
+ * Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,17 +29,19 @@
*/
package org.apache.tapestry5.internal.plastic.asm.tree;
+import org.apache.tapestry5.internal.plastic.asm.AnnotationVisitor;
+import org.apache.tapestry5.internal.plastic.asm.Opcodes;
+
import java.util.ArrayList;
import java.util.List;
-import org.apache.tapestry5.internal.plastic.asm.AnnotationVisitor;
-
/**
* A node that represents an annotationn.
- *
+ *
* @author Eric Bruneton
*/
-public class AnnotationNode implements AnnotationVisitor {
+public class AnnotationNode extends AnnotationVisitor
+{
/**
* The class descriptor of the annotation class.
@@ -57,33 +59,49 @@ public class AnnotationNode implements AnnotationVisitor {
* preceding types. The list may be <tt>null</tt> if there is no name
* value pair.
*/
- public List values;
+ public List<Object> values;
/**
- * Constructs a new {@link AnnotationNode}.
- *
+ * Constructs a new {@link AnnotationNode}. <i>Subclasses must not use this
+ * constructor</i>. Instead, they must use the
+ * {@link #AnnotationNode(int, String)} version.
+ *
* @param desc the class descriptor of the annotation class.
*/
public AnnotationNode(final String desc) {
+ this(Opcodes.ASM4, desc);
+ }
+
+ /**
+ * Constructs a new {@link AnnotationNode}.
+ *
+ * @param api the ASM API version implemented by this visitor. Must be one
+ * of {@link Opcodes#ASM4}.
+ * @param desc the class descriptor of the annotation class.
+ */
+ public AnnotationNode(final int api, final String desc) {
+ super(api);
this.desc = desc;
}
/**
* Constructs a new {@link AnnotationNode} to visit an array value.
- *
+ *
* @param values where the visited values must be stored.
*/
- AnnotationNode(final List values) {
+ AnnotationNode(final List<Object> values) {
+ super(Opcodes.ASM4);
this.values = values;
}
// ------------------------------------------------------------------------
- // Implementation of the AnnotationVisitor interface
+ // Implementation of the AnnotationVisitor abstract class
// ------------------------------------------------------------------------
+ @Override
public void visit(final String name, final Object value) {
if (values == null) {
- values = new ArrayList(this.desc != null ? 2 : 1);
+ values = new ArrayList<Object>(this.desc != null ? 2 : 1);
}
if (this.desc != null) {
values.add(name);
@@ -91,13 +109,14 @@ public class AnnotationNode implements AnnotationVisitor {
values.add(value);
}
+ @Override
public void visitEnum(
final String name,
final String desc,
final String value)
{
if (values == null) {
- values = new ArrayList(this.desc != null ? 2 : 1);
+ values = new ArrayList<Object>(this.desc != null ? 2 : 1);
}
if (this.desc != null) {
values.add(name);
@@ -105,12 +124,13 @@ public class AnnotationNode implements AnnotationVisitor {
values.add(new String[] { desc, value });
}
+ @Override
public AnnotationVisitor visitAnnotation(
final String name,
final String desc)
{
if (values == null) {
- values = new ArrayList(this.desc != null ? 2 : 1);
+ values = new ArrayList<Object>(this.desc != null ? 2 : 1);
}
if (this.desc != null) {
values.add(name);
@@ -120,18 +140,20 @@ public class AnnotationNode implements AnnotationVisitor {
return annotation;
}
+ @Override
public AnnotationVisitor visitArray(final String name) {
if (values == null) {
- values = new ArrayList(this.desc != null ? 2 : 1);
+ values = new ArrayList<Object>(this.desc != null ? 2 : 1);
}
if (this.desc != null) {
values.add(name);
}
- List array = new ArrayList();
+ List<Object> array = new ArrayList<Object>();
values.add(array);
return new AnnotationNode(array);
}
+ @Override
public void visitEnd() {
}
@@ -140,8 +162,20 @@ public class AnnotationNode implements AnnotationVisitor {
// ------------------------------------------------------------------------
/**
+ * Checks that this annotation node is compatible with the given ASM API
+ * version. This methods checks that this node, and all its nodes
+ * recursively, do not contain elements that were introduced in more recent
+ * versions of the ASM API than the given version.
+ *
+ * @param api an ASM API version. Must be one of {@link Opcodes#ASM4}.
+ */
+ public void check(final int api) {
+ // nothing to do
+ }
+
+ /**
* Makes the given visitor visit this annotation.
- *
+ *
* @param av an annotation visitor. Maybe <tt>null</tt>.
*/
public void accept(final AnnotationVisitor av) {
@@ -159,7 +193,7 @@ public class AnnotationNode implements AnnotationVisitor {
/**
* Makes the given visitor visit a given annotation value.
- *
+ *
* @param av an annotation visitor. Maybe <tt>null</tt>.
* @param name the value name.
* @param value the actual value.
@@ -178,7 +212,7 @@ public class AnnotationNode implements AnnotationVisitor {
an.accept(av.visitAnnotation(name, an.desc));
} else if (value instanceof List) {
AnnotationVisitor v = av.visitArray(name);
- List array = (List) value;
+ List<?> array = (List<?>) value;
for (int j = 0; j < array.size(); ++j) {
accept(v, null, array.get(j));
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d6e5f413/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 f166ebd..7bda1ab 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
@@ -1,6 +1,6 @@
/***
* ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
+ * Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,21 +29,18 @@
*/
package org.apache.tapestry5.internal.plastic.asm.tree;
-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.*;
-import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
/**
* A node that represents a class.
- *
+ *
* @author Eric Bruneton
*/
-public class ClassNode extends MemberNode implements ClassVisitor {
+public class ClassNode extends ClassVisitor {
/**
* The class version.
@@ -80,7 +77,7 @@ public class ClassNode extends MemberNode implements ClassVisitor {
* {@link org.apache.tapestry5.internal.plastic.asm.Type#getInternalName() getInternalName}). This
* list is a list of {@link String} objects.
*/
- public List interfaces;
+ public List<String> interfaces;
/**
* The name of the source file from which this class was compiled. May be
@@ -113,43 +110,83 @@ public class ClassNode extends MemberNode implements ClassVisitor {
public String outerMethodDesc;
/**
+ * The runtime visible annotations of this class. This list is a list of
+ * {@link AnnotationNode} objects. May be <tt>null</tt>.
+ *
+ * @associates AnnotationNode
+ * @label visible
+ */
+ public List<AnnotationNode> visibleAnnotations;
+
+ /**
+ * The runtime invisible annotations of this class. This list is a list of
+ * {@link AnnotationNode} objects. May be <tt>null</tt>.
+ *
+ * @associates AnnotationNode
+ * @label invisible
+ */
+ public List<AnnotationNode> invisibleAnnotations;
+
+ /**
+ * The non standard attributes of this class. This list is a list of
+ * {@link Attribute} objects. May be <tt>null</tt>.
+ *
+ * @associates Attribute
+ */
+ public List<Attribute> attrs;
+
+ /**
* Informations about the inner classes of this class. This list is a list
* of {@link InnerClassNode} objects.
- *
- * @associates org.objectweb.asm.tree.InnerClassNode
+ *
+ * @associates InnerClassNode
*/
- public List innerClasses;
+ public List<InnerClassNode> innerClasses;
/**
* The fields of this class. This list is a list of {@link FieldNode}
* objects.
- *
- * @associates org.objectweb.asm.tree.FieldNode
+ *
+ * @associates FieldNode
*/
- public List fields;
+ public List<FieldNode> fields;
/**
* The methods of this class. This list is a list of {@link MethodNode}
* objects.
- *
- * @associates org.objectweb.asm.tree.MethodNode
+ *
+ * @associates MethodNode
*/
- public List methods;
+ public List<MethodNode> methods;
/**
- * Constructs a new {@link ClassNode}.
+ * Constructs a new {@link ClassNode}. <i>Subclasses must not use this
+ * constructor</i>. Instead, they must use the {@link #ClassNode(int)}
+ * version.
*/
public ClassNode() {
- this.interfaces = new ArrayList();
- this.innerClasses = new ArrayList();
- this.fields = new ArrayList();
- this.methods = new ArrayList();
+ this(Opcodes.ASM4);
+ }
+
+ /**
+ * Constructs a new {@link ClassNode}.
+ *
+ * @param api the ASM API version implemented by this visitor. Must be one
+ * of {@link Opcodes#ASM4}.
+ */
+ public ClassNode(final int api) {
+ super(api);
+ this.interfaces = new ArrayList<String>();
+ this.innerClasses = new ArrayList<InnerClassNode>();
+ this.fields = new ArrayList<FieldNode>();
+ this.methods = new ArrayList<MethodNode>();
}
// ------------------------------------------------------------------------
- // Implementation of the ClassVisitor interface
+ // Implementation of the ClassVisitor abstract class
// ------------------------------------------------------------------------
+ @Override
public void visit(
final int version,
final int access,
@@ -168,11 +205,13 @@ public class ClassNode extends MemberNode implements ClassVisitor {
}
}
+ @Override
public void visitSource(final String file, final String debug) {
sourceFile = file;
sourceDebug = debug;
}
+ @Override
public void visitOuterClass(
final String owner,
final String name,
@@ -183,6 +222,35 @@ public class ClassNode extends MemberNode implements ClassVisitor {
outerMethodDesc = desc;
}
+ @Override
+ public AnnotationVisitor visitAnnotation(
+ final String desc,
+ final boolean visible)
+ {
+ AnnotationNode an = new AnnotationNode(desc);
+ if (visible) {
+ if (visibleAnnotations == null) {
+ visibleAnnotations = new ArrayList<AnnotationNode>(1);
+ }
+ visibleAnnotations.add(an);
+ } else {
+ if (invisibleAnnotations == null) {
+ invisibleAnnotations = new ArrayList<AnnotationNode>(1);
+ }
+ invisibleAnnotations.add(an);
+ }
+ return an;
+ }
+
+ @Override
+ public void visitAttribute(final Attribute attr) {
+ if (attrs == null) {
+ attrs = new ArrayList<Attribute>(1);
+ }
+ attrs.add(attr);
+ }
+
+ @Override
public void visitInnerClass(
final String name,
final String outerName,
@@ -196,6 +264,7 @@ public class ClassNode extends MemberNode implements ClassVisitor {
innerClasses.add(icn);
}
+ @Override
public FieldVisitor visitField(
final int access,
final String name,
@@ -208,6 +277,7 @@ public class ClassNode extends MemberNode implements ClassVisitor {
return fn;
}
+ @Override
public MethodVisitor visitMethod(
final int access,
final String name,
@@ -224,13 +294,29 @@ public class ClassNode extends MemberNode implements ClassVisitor {
return mn;
}
+ @Override
+ public void visitEnd() {
+ }
+
// ------------------------------------------------------------------------
// Accept method
// ------------------------------------------------------------------------
/**
+ * Checks that this class node is compatible with the given ASM API version.
+ * This methods checks that this node, and all its nodes recursively, do not
+ * contain elements that were introduced in more recent versions of the ASM
+ * API than the given version.
+ *
+ * @param api an ASM API version. Must be one of {@link Opcodes#ASM4}.
+ */
+ public void check(final int api) {
+ // nothing to do
+ }
+
+ /**
* Makes the given class visitor visit this class.
- *
+ *
* @param cv a class visitor.
*/
public void accept(final ClassVisitor cv) {
@@ -250,29 +336,29 @@ public class ClassNode extends MemberNode implements ClassVisitor {
int i, n;
n = visibleAnnotations == null ? 0 : visibleAnnotations.size();
for (i = 0; i < n; ++i) {
- AnnotationNode an = (AnnotationNode) visibleAnnotations.get(i);
+ AnnotationNode an = visibleAnnotations.get(i);
an.accept(cv.visitAnnotation(an.desc, true));
}
n = invisibleAnnotations == null ? 0 : invisibleAnnotations.size();
for (i = 0; i < n; ++i) {
- AnnotationNode an = (AnnotationNode) invisibleAnnotations.get(i);
+ AnnotationNode an = invisibleAnnotations.get(i);
an.accept(cv.visitAnnotation(an.desc, false));
}
n = attrs == null ? 0 : attrs.size();
for (i = 0; i < n; ++i) {
- cv.visitAttribute((Attribute) attrs.get(i));
+ cv.visitAttribute(attrs.get(i));
}
// visits inner classes
for (i = 0; i < innerClasses.size(); ++i) {
- ((InnerClassNode) innerClasses.get(i)).accept(cv);
+ innerClasses.get(i).accept(cv);
}
// visits fields
for (i = 0; i < fields.size(); ++i) {
- ((FieldNode) fields.get(i)).accept(cv);
+ fields.get(i).accept(cv);
}
// visits methods
for (i = 0; i < methods.size(); ++i) {
- ((MethodNode) methods.get(i)).accept(cv);
+ methods.get(i).accept(cv);
}
// visits end
cv.visitEnd();