Renamed jode package to net.sf.jode git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1333 379699f6-c40d-0410-875b-85095c16579emaster
parent
a2006f63d4
commit
31ebef4f9c
@ -1,3 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
SUBDIRS = bin doc jode test
|
@ -1,44 +0,0 @@ |
||||
dnl |
||||
dnl Add macros |
||||
dnl JODE_CHECK_JAVA |
||||
dnl |
||||
|
||||
dnl JODE_CHECK_JAVA(path) |
||||
AC_DEFUN(JODE_CHECK_JAVA, |
||||
[ |
||||
AC_PATH_PROG(JAVA, java, "", $1/bin:$1/jre/bin:$PATH) |
||||
AC_PATH_PROG(JAVAC, javac, "", $1/bin:$PATH) |
||||
AC_PATH_PROG(JAR, jar, "", $1/bin:$PATH) |
||||
for path in $1/lib $1/jre/lib $1/shared; do |
||||
for classlib in classes.zip rt.jar; do |
||||
AC_CHECK_FILES($path/$classlib, |
||||
[ CLASSLIB=$path/$classlib |
||||
break 3 |
||||
], [ true ]) |
||||
done |
||||
done |
||||
AC_SUBST(CLASSPATH) |
||||
AC_SUBST(CLASSLIB) |
||||
]) |
||||
|
||||
AC_DEFUN(JODE_CHECK_CLASS, |
||||
[ |
||||
if (IFS=":" |
||||
clazz=`echo $1 | sed -e 's/\./\//g' -e 's/\(.*\)/\1.class/'` |
||||
myclasspath=$2; |
||||
for path in $myclasspath; do |
||||
if test -d $path; then |
||||
if test -f $path/$clazz; then |
||||
exit 0 |
||||
fi |
||||
elif CLASS_CHECK $path $clazz ; then |
||||
exit 0 |
||||
fi |
||||
done; |
||||
exit 1) |
||||
then |
||||
$3 |
||||
else |
||||
$4 |
||||
fi |
||||
]) |
@ -0,0 +1,198 @@ |
||||
<?xml version="1.0" encoding="iso-8859-1"?> |
||||
<!-- Jakarta-Ant build file for jode, Copyright (C) 1999-2001 Jochen Hoenicke. |
||||
|
||||
This program is free software; you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation; either version 2, or (at your option) |
||||
any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; see the file COPYING. If not, write to |
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
||||
|
||||
$Id$ |
||||
--> |
||||
|
||||
<!DOCTYPE project PUBLIC "-//ANT//DTD project//EN" "project.dtd"> |
||||
<project name="jode" default="build" basedir="."> |
||||
<!-- set global properties for this build --> |
||||
<property name="version" value="1.90"/> |
||||
<property name="build" value="build"/> |
||||
<property name="props" value="props"/> |
||||
<property name="dist" value="dist"/> |
||||
<property name="docs" value="docs"/> |
||||
<property name="lib" value="lib"/> |
||||
|
||||
<property name="jcpp" value="scripts/jcpp.pl"/> |
||||
|
||||
<property name="versionfile" value="${src}/jode/GlobalOptions.java"/> |
||||
|
||||
<path id="project.classpath"> |
||||
<pathelement path="${classpath}"/> |
||||
<pathelement location="lib/getopt.jar"/> |
||||
</path> |
||||
|
||||
<!-- --> |
||||
|
||||
<!-- compiles jode and creates its javadoc-files --> |
||||
<target name="all" depends="dist,javadoc"/> |
||||
|
||||
<!-- build the Jode files --> |
||||
<target name="build" depends="check-jdk,preconfig"> |
||||
<mkdir dir="${build}"/> |
||||
<javac srcdir="${src}" |
||||
destdir="${build}" |
||||
classpathref="project.classpath"> |
||||
<exclude name="net/sf/jode/obfuscator/" /> |
||||
<exclude name="net/sf/jode/bytecode/*Subroutine*" /> |
||||
</javac> |
||||
<copy todir="${build}"> |
||||
<fileset dir="src"/> |
||||
</copy> |
||||
</target> |
||||
|
||||
<target name="build-1.1"> |
||||
<property name="collections.package" |
||||
value="gnu.java.util.collections"/> |
||||
<property name="swing.package" |
||||
value="javax.swing"/> |
||||
<property name="jdk1.2+" value="false"/> |
||||
<antcall name="build"/> |
||||
</target> |
||||
|
||||
<target name="check-jdk" unless="jdk1.1.forced"> |
||||
<available property="jdk1.2+" classname="java.lang.ThreadLocal" /> |
||||
<available property="jdk1.3+" classname="java.lang.StrictMath" /> |
||||
</target> |
||||
|
||||
<target name="fail-getopt" unless="getopt.present"> |
||||
<fail message="Package gnu.getopt not found!"/> |
||||
</target> |
||||
<target name="check-getopt"> |
||||
<available property="getopt.present" |
||||
classname="gnu.getopt.Getopt" |
||||
classpathref="project.classpath" /> |
||||
<antcall target="fail-getopt"/> |
||||
</target> |
||||
|
||||
<target name="check-packages"> |
||||
<available property="collections.package" |
||||
value="gnu.java.util.collections" |
||||
classname="gnu.java.util.collections.Set" |
||||
classpathref="project.classpath" /> |
||||
<available property="collections.package" |
||||
value="org.gnu.java.util.collections" |
||||
classname="org.gnu.java.util.collections.Set" |
||||
classpathref="project.classpath" /> |
||||
<available property="collections.package" |
||||
value="com.sun.java.util.collections" |
||||
classname="com.sun.java.util.collections.Set" |
||||
classpathref="project.classpath" /> |
||||
<available property="swing.package" value="javax.swing" |
||||
classname="javax.swing.JFrame" |
||||
classpathref="project.classpath" /> |
||||
<available property="swing.package" value="com.sun.java.swing" |
||||
classname="com.sun.java.swing.JFrame" |
||||
classpathref="project.classpath" /> |
||||
</target> |
||||
|
||||
<target name="preconfig" depends="check-jdk,preconfig.11,preconfig.12"/> |
||||
<target name="preconfig.11" unless="jdk1.2+"> |
||||
<property name="src" value="src-1.1"/> |
||||
<antcall target="runjcpp"/> |
||||
</target> |
||||
|
||||
<target name="preconfig.12" if="jdk1.2+"> |
||||
<property name="src" value="src"/> |
||||
</target> |
||||
|
||||
<target name="runjcpp" depends="check-packages"> |
||||
<copy todir="${src}"> |
||||
<fileset dir="src"/> |
||||
</copy> |
||||
<execon dir="." executable="perl" parallel="true"> |
||||
<arg file="${jcpp}"/> |
||||
<arg value="-DJDK11"/> |
||||
<arg value="-DCOLLECTIONS=${collections.package}"/> |
||||
<arg value="-DCOLLECTIONEXTRA=${collections.package}"/> |
||||
<arg value="-DJAVAX_SWING=${swing.package}"/> |
||||
<fileset dir="${src}" includes="**/*.java"/> |
||||
</execon> |
||||
</target> |
||||
|
||||
<!-- create the jar-files --> |
||||
<target name="dist" depends="distclass,distdoc"> |
||||
<jar jarfile="${dist}/jode-${version}.jar" |
||||
basedir="${dist}" |
||||
includes="jode.jar,doc.jar"/> |
||||
</target> |
||||
|
||||
<target name="distclass" depends="build"> |
||||
<mkdir dir="${dist}"/> |
||||
<jar jarfile="${dist}/jode.jar" |
||||
basedir="${build}"/> |
||||
</target> |
||||
|
||||
<target name="distdoc" depends="javadoc"> |
||||
<jar jarfile="${dist}/doc.jar" |
||||
basedir="${docs}"/> |
||||
</target> |
||||
|
||||
<!-- javadoc --> |
||||
<target name="javadoc"> |
||||
<mkdir dir="${docs}/api"/> |
||||
<javadoc packagenames="net.sf.jode.*" |
||||
sourcepath="${src}" |
||||
destdir="${docs}/api"/> |
||||
</target> |
||||
|
||||
<!-- ********* clean targets ************* --> |
||||
|
||||
<!-- clean all --> |
||||
<target name="clean" depends="cleanbuild,cleanjavadoc"/> |
||||
|
||||
|
||||
<!-- clean the class files --> |
||||
<target name="cleanbuild"> |
||||
<delete dir="${build}"/> |
||||
</target> |
||||
|
||||
<!-- clean javadocs --> |
||||
<target name="cleanjavadoc"> |
||||
<delete dir="${docs}/api"/> |
||||
</target> |
||||
|
||||
<!-- version stuff --> |
||||
|
||||
<target name="setversion" if="version"> |
||||
<echo message="---------------------------------------------------"/> |
||||
<echo message=' Creating new Jode version: "${version}" !!!'/> |
||||
<echo message="==================================================="/> |
||||
<!-- |
||||
search the old version information and replace it with the new version |
||||
we will search the $(mainclass) for 'String VERSION = "..."' and |
||||
replace the contents of the String with the new version. |
||||
--> |
||||
<echo message="updating version in ${versionfile} ..."/> |
||||
<exec executable="perl"> |
||||
<arg value="-i"/> |
||||
<arg value="-pe"/> |
||||
<arg value='s/(String\s*version\s*=\s*")[^"]*/$1${version}/' /> |
||||
<arg value="${versionfile}"/> |
||||
</exec> |
||||
|
||||
<!-- |
||||
commit the new $(VERSIONFILE) to the CVS |
||||
<echo message="commiting updated file to CVS..."/> |
||||
<cvs command='ci -m"new version ${version}" ${versionfile}'/> |
||||
--> |
||||
|
||||
<echo message="...done!"/> |
||||
<echo message="---------------------------------------------------"/> |
||||
</target> |
||||
</project> |
@ -1,187 +0,0 @@ |
||||
dnl Process this file with autoconf to produce a configure script. |
||||
AC_INIT() |
||||
|
||||
AM_INIT_AUTOMAKE(jode, 1.1) |
||||
|
||||
dnl Checks for programs. |
||||
AC_PROG_MAKE_SET |
||||
AC_PATH_PROG(PERL, perl) |
||||
AC_PATH_PROG(CYGPATH, cygpath) |
||||
|
||||
dnl Checks for libraries. |
||||
|
||||
dnl Checks for header files. |
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics. |
||||
|
||||
dnl Checks for library functions. |
||||
|
||||
dnl hack to quote Makefile lines |
||||
QUOTE="" |
||||
AC_SUBST(QUOTE) |
||||
|
||||
AC_SUBST(SHELL) |
||||
|
||||
if test -n "$CYGPATH"; then |
||||
# Extra check if java take windows path? |
||||
CLASSPATH=`$CYGPATH --unix --path $CLASSPATH` |
||||
SUBSTCP="$CYGPATH --windows --path" |
||||
else |
||||
SUBSTCP="echo" |
||||
fi |
||||
|
||||
AC_SUBST(SUBSTCP) |
||||
|
||||
AC_ARG_WITH(java, |
||||
[ --with-java specify path to a java-like program ], |
||||
[ |
||||
if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then |
||||
# set javac to user input value |
||||
JODE_CHECK_JAVA(${withval}) |
||||
else |
||||
JODE_CHECK_JAVA(/usr/lib/java) |
||||
fi |
||||
], |
||||
[ |
||||
JODE_CHECK_JAVA(/usr/lib/java) |
||||
]) |
||||
|
||||
dnl jikes can also handle dependancies. |
||||
AC_ARG_WITH(jikes, |
||||
[ --with-jikes specify location of jikes ], |
||||
[ |
||||
USER_SPECIFIED_JIKES=true |
||||
if test "${withval}" = "yes" || test "${withval}" = ""; then |
||||
AC_PATH_PROG(JIKES, jikes, "", $PATH) |
||||
else |
||||
echo "searching jikes in ${withval}:$PATH" |
||||
AC_PATH_PROG(JIKES, jikes, "", ${withval}:$PATH) |
||||
fi |
||||
if test -n "$JIKES"; then |
||||
JAVAC=$JIKES |
||||
fi |
||||
], |
||||
[ |
||||
USER_SPECIFIED_JIKES= |
||||
AC_PATH_PROG(JIKES, jikes, "", $PATH) |
||||
]) |
||||
AM_CONDITIONAL(HAVE_JIKES, test x"$JIKES" != x) |
||||
|
||||
AC_ARG_WITH(javac, |
||||
[ --with-javac specify location of javac ], |
||||
[ |
||||
if test x$USER_SPECIFIED_JIKES = xtrue; then |
||||
AC_MSG_ERROR(You must only give one option --with-javac or --with-jikes) |
||||
fi |
||||
if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then |
||||
AC_CHECK_FILES(${withval}, |
||||
[ JAVAC=${withval} ], |
||||
[ AC_MSG_ERROR(${withval} does not exists) ]) |
||||
fi |
||||
], [ |
||||
dnl use jikes as default, if javac option not given. |
||||
if test -n "$JIKES"; then |
||||
JAVAC=$JIKES |
||||
fi |
||||
]) |
||||
|
||||
AC_PATH_PROG(UNZIP, unzip) |
||||
if test -n "$UNZIP"; then |
||||
CLASS_CHECK () { |
||||
$UNZIP -v -C `$SUBSTCP $1` $2 >/dev/null 2>&1 |
||||
} |
||||
else |
||||
if test -n "$JAR"; then |
||||
CLASS_CHECK () { |
||||
$JAR -tf `$SUBSTCP $1` 2>&1 | grep $2 >/dev/null |
||||
} |
||||
else |
||||
AC_MSG_ERROR(You need either unzip or jar.) |
||||
fi |
||||
fi |
||||
|
||||
AC_MSG_CHECKING(for java.lang.Object) |
||||
JODE_CHECK_CLASS(java.lang.Object, $CLASSLIB, |
||||
[ AC_MSG_RESULT(yes) ], |
||||
[ AC_MSG_RESULT(no) |
||||
AC_MSG_ERROR(Please specify location of core java class library) ]) |
||||
|
||||
AC_MSG_CHECKING(for java.lang.ref.WeakReference) |
||||
JODE_CHECK_CLASS(java.lang.ref.WeakReference, $CLASSLIB, |
||||
[ AC_MSG_RESULT(yes) |
||||
JCPPFLAGS="-DJDK12" ], |
||||
[ AC_MSG_RESULT(no) |
||||
JCPPFLAGS="-DJDK11" ]) |
||||
|
||||
AC_MSG_CHECKING(for collection classes) |
||||
JODE_CHECK_CLASS(java.util.Set, $CLASSPATH:$CLASSLIB, |
||||
[ COLLECTIONS="java.util" |
||||
COLLECTIONEXTRA="java.lang" ], |
||||
[ JODE_CHECK_CLASS(gnu.java.util.collections.Set, $CLASSPATH:$CLASSLIB, |
||||
[ COLLECTIONS="gnu.java.util.collections" |
||||
COLLECTIONEXTRA="gnu.java.util.collections" ], |
||||
[ JODE_CHECK_CLASS(com.sun.java.util.collections.Set, $CLASSPATH:$CLASSLIB, |
||||
[ COLLECTIONS="com.sun.java.util.collections" |
||||
COLLECTIONEXTRA="com.sun.java.util.collections" ], |
||||
[ AC_MSG_RESULT(no) |
||||
AC_MSG_ERROR(You need the Java 1.2 collection classes in your classpath) |
||||
]) |
||||
]) |
||||
]) |
||||
AC_MSG_RESULT($COLLECTIONS) |
||||
AC_SUBST(COLLECTIONS) |
||||
AC_SUBST(COLLECTIONEXTRA) |
||||
|
||||
AC_MSG_CHECKING(for gnu.getopt) |
||||
JODE_CHECK_CLASS(gnu.getopt.Getopt, $CLASSPATH:$CLASSLIB, |
||||
[ AC_MSG_RESULT(yes) ], |
||||
[ AC_MSG_RESULT(no) |
||||
AC_MSG_ERROR(You need gnu getopt for java.) ]) |
||||
|
||||
AC_MSG_CHECKING(for swing) |
||||
JODE_CHECK_CLASS(javax.swing.JFrame, $CLASSPATH:$CLASSLIB, |
||||
[ JAVAX_SWING="javax.swing" ], |
||||
[ JODE_CHECK_CLASS(com.sun.java.swing.JFrame, $CLASSPATH:$CLASSLIB, |
||||
[ JAVAX_SWING="com.sun.java.swing" ], |
||||
[ JAVAX_SWING="no" ]) ] ) |
||||
AC_MSG_RESULT($JAVAX_SWING) |
||||
AC_SUBST(JAVAX_SWING) |
||||
if test "$JAVAX_SWING" != "no"; then |
||||
SWINGUI="swingui" |
||||
else |
||||
AC_MSG_WARN(Swing is not in classpath ... skipping swingui) |
||||
SWINGUI="" |
||||
fi |
||||
AC_SUBST(SWINGUI) |
||||
|
||||
JCPPFLAGS="$JCPPFLAGS -DCOLLECTIONS=$COLLECTIONS -DCOLLECTIONEXTRA=$COLLECTIONEXTRA -DJAVAX_SWING=$JAVAX_SWING" |
||||
|
||||
AC_SUBST(CLASSPATH) |
||||
AC_SUBST(JAVAC) |
||||
AC_SUBST(JAR) |
||||
|
||||
AC_OUTPUT(Makefile |
||||
jode/Makefile |
||||
jode/bytecode/Makefile |
||||
jode/decompiler/Makefile |
||||
jode/expr/Makefile |
||||
jode/flow/Makefile |
||||
jode/jvm/Makefile |
||||
jode/obfuscator/Makefile |
||||
jode/obfuscator/modules/Makefile |
||||
jode/swingui/Makefile |
||||
jode/type/Makefile |
||||
jode/util/Makefile |
||||
bin/Makefile |
||||
bin/jode |
||||
bin/jode.bat |
||||
doc/Makefile |
||||
test/Makefile, |
||||
[chmod 755 bin/jode], |
||||
[for i in \$CONFIG_FILES; do |
||||
changequote(, )dnl |
||||
if [ \$i != \${i%.java} ]; then |
||||
changequote([, ])dnl |
||||
$PERL $srcdir/scripts/jcpp.pl $JCPPFLAGS \$i |
||||
fi |
||||
done]) |
@ -1,4 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
||||
.java.deps |
||||
jode.jar |
@ -1,37 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
SUBDIRS = util bytecode type jvm expr flow decompiler @SWINGUI@ # obfuscator
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
GlobalOptions.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
JARFILE = jode-@VERSION@.jar
|
||||
#data_DATA = $(JARFILE)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
||||
|
||||
$(JARFILE): $(noinst_DATA) |
||||
CLASSPATH=$(top_builddir):$(CLASSPATH) $(JAVA) -mx80m \
|
||||
jode.obfuscator.Main --classpath=$(top_builddir) \
|
||||
--dest=$(JARFILE) -v -v $(srcdir)/jode.jodescript
|
@ -1,2 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
@ -1,44 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
BasicBlocks.java \
|
||||
BasicBlockReader.java \
|
||||
BasicBlockWriter.java \
|
||||
BinaryInfo.java \
|
||||
Block.java \
|
||||
ClassFormatException.java \
|
||||
ClassInfo.java \
|
||||
ClassPath.java \
|
||||
ConstantPool.java \
|
||||
FieldInfo.java \
|
||||
GrowableConstantPool.java \
|
||||
Handler.java \
|
||||
Instruction.java \
|
||||
LocalVariableInfo.java \
|
||||
MethodInfo.java \
|
||||
Opcodes.java \
|
||||
Reference.java \
|
||||
TypeSignature.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
@ -1,2 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
@ -1,45 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
Analyzer.java \
|
||||
Applet.java \
|
||||
ClassAnalyzer.java \
|
||||
ClassDeclarer.java \
|
||||
Declarable.java \
|
||||
Decompiler.java \
|
||||
FieldAnalyzer.java \
|
||||
ImportHandler.java \
|
||||
LocalInfo.java \
|
||||
Main.java \
|
||||
MethodAnalyzer.java \
|
||||
Opcodes.java \
|
||||
Options.java \
|
||||
OuterValueListener.java \
|
||||
OuterValues.java \
|
||||
ProgressListener.java \
|
||||
Scope.java \
|
||||
TabbedPrintWriter.java \
|
||||
Window.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
@ -1,2 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
@ -1,69 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
ArrayLengthOperator.java \
|
||||
ArrayLoadOperator.java \
|
||||
ArrayStoreOperator.java \
|
||||
BinaryOperator.java \
|
||||
CheckCastOperator.java \
|
||||
CheckNullOperator.java \
|
||||
ClassFieldOperator.java \
|
||||
CombineableOperator.java \
|
||||
CompareBinaryOperator.java \
|
||||
CompareToIntOperator.java \
|
||||
CompareUnaryOperator.java \
|
||||
ConstOperator.java \
|
||||
ConstantArrayOperator.java \
|
||||
ConvertOperator.java \
|
||||
Expression.java \
|
||||
FieldOperator.java \
|
||||
GetFieldOperator.java \
|
||||
IIncOperator.java \
|
||||
IfThenElseOperator.java \
|
||||
InstanceOfOperator.java \
|
||||
InvokeOperator.java \
|
||||
LValueExpression.java \
|
||||
LocalLoadOperator.java \
|
||||
LocalStoreOperator.java \
|
||||
LocalVarOperator.java \
|
||||
MatchableOperator.java \
|
||||
MonitorEnterOperator.java \
|
||||
MonitorExitOperator.java \
|
||||
NewArrayOperator.java \
|
||||
NewOperator.java \
|
||||
NoArgOperator.java \
|
||||
NopOperator.java \
|
||||
Operator.java \
|
||||
OuterLocalOperator.java \
|
||||
PopOperator.java \
|
||||
PrePostFixOperator.java \
|
||||
PutFieldOperator.java \
|
||||
ShiftOperator.java \
|
||||
SimpleOperator.java \
|
||||
StoreInstruction.java \
|
||||
StringAddOperator.java \
|
||||
ThisOperator.java \
|
||||
UnaryOperator.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
@ -1,2 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
@ -1,67 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
BreakBlock.java \
|
||||
BreakableBlock.java \
|
||||
CaseBlock.java \
|
||||
CatchBlock.java \
|
||||
CombineIfGotoExpressions.java \
|
||||
CompleteSynchronized.java \
|
||||
ConditionalBlock.java \
|
||||
ContinueBlock.java \
|
||||
CreateAssignExpression.java \
|
||||
CreateCheckNull.java \
|
||||
CreateClassField.java \
|
||||
CreateConstantArray.java \
|
||||
CreateExpression.java \
|
||||
CreateForInitializer.java \
|
||||
CreateIfThenElseOperator.java \
|
||||
CreateNewConstructor.java \
|
||||
CreatePrePostIncExpression.java \
|
||||
DescriptionBlock.java \
|
||||
EmptyBlock.java \
|
||||
FinallyBlock.java \
|
||||
FlowBlock.java \
|
||||
IfThenElseBlock.java \
|
||||
InstructionBlock.java \
|
||||
InstructionContainer.java \
|
||||
JsrBlock.java \
|
||||
Jump.java \
|
||||
LoopBlock.java \
|
||||
RetBlock.java \
|
||||
ReturnBlock.java \
|
||||
SequentialBlock.java \
|
||||
SlotSet.java \
|
||||
SpecialBlock.java \
|
||||
StructuredBlock.java \
|
||||
SwitchBlock.java \
|
||||
SynchronizedBlock.java \
|
||||
ThrowBlock.java \
|
||||
TransformConstructors.java \
|
||||
TransformExceptionHandlers.java \
|
||||
TryBlock.java \
|
||||
VariableSet.java \
|
||||
VariableStack.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
@ -1,2 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
@ -1,35 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
CodeVerifier.java \
|
||||
Interpreter.java \
|
||||
InterpreterException.java \
|
||||
NewObject.java \
|
||||
RuntimeEnvironment.java \
|
||||
SimpleRuntimeEnvironment.java \
|
||||
SyntheticAnalyzer.java \
|
||||
Value.java \
|
||||
VerifyException.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
@ -1,2 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
@ -1,45 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
SUBDIRS = modules
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
ClassBundle.java \
|
||||
ClassIdentifier.java \
|
||||
CodeAnalyzer.java \
|
||||
CodeTransformer.java \
|
||||
ConstantRuntimeEnvironment.java \
|
||||
FieldIdentifier.java \
|
||||
Identifier.java \
|
||||
IdentifierMatcher.java \
|
||||
LocalIdentifier.java \
|
||||
Main.java \
|
||||
MethodIdentifier.java \
|
||||
OptionHandler.java \
|
||||
PackageIdentifier.java \
|
||||
ParseException.java \
|
||||
Renamer.java \
|
||||
ScriptParser.java \
|
||||
TranslationTable.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
@ -1,2 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
@ -1,39 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
ConstantAnalyzer.java \
|
||||
IdentityRenamer.java \
|
||||
KeywordRenamer.java \
|
||||
LocalOptimizer.java \
|
||||
ModifierMatcher.java \
|
||||
MultiIdentifierMatcher.java \
|
||||
NameSwapper.java \
|
||||
RemovePopAnalyzer.java \
|
||||
SerializePreserver.java \
|
||||
SimpleAnalyzer.java \
|
||||
StrongRenamer.java \
|
||||
UniqueRenamer.java \
|
||||
WildCard.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
@ -1,2 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
@ -1,30 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
ClassPathDialog.java \
|
||||
HierarchyTreeModel.java \
|
||||
Main.java \
|
||||
PackagesTreeModel.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
@ -1,2 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
@ -1,37 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
ArrayType.java \
|
||||
ClassType.java \
|
||||
ClassInfoType.java \
|
||||
IntegerType.java \
|
||||
MethodType.java \
|
||||
MultiClassType.java \
|
||||
NullType.java \
|
||||
RangeType.java \
|
||||
ReferenceType.java \
|
||||
SystemClassType.java \
|
||||
Type.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
@ -1,2 +0,0 @@ |
||||
Makefile |
||||
Makefile.in |
@ -1,31 +0,0 @@ |
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
JAVADEP = $(PERL) -w -s $(top_srcdir)/scripts/javaDependencies.pl \
|
||||
-subdir=$(subdir) -dependdir=$(top_builddir) \
|
||||
-classpath=$(top_builddir):$(top_srcdir) -depfile=Makefile.dep
|
||||
CLASSPATH = @CLASSPATH@
|
||||
CLASSLIB = @CLASSLIB@
|
||||
SUBSTCP = @SUBSTCP@
|
||||
FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB))
|
||||
|
||||
MY_JAVA_FILES = \
|
||||
ArrayEnum.java \
|
||||
SimpleMap.java \
|
||||
SimpleSet.java \
|
||||
StringQuoter.java \
|
||||
UnifyHash.java
|
||||
|
||||
noinst_DATA = $(MY_JAVA_FILES:.java=.class)
|
||||
EXTRA_DIST = $(MY_JAVA_FILES)
|
||||
|
||||
@QUOTE@-include Makefile.dep |
||||
|
||||
%.class: %.java |
||||
$(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $<
|
||||
|
||||
Makefile.dep: $(MY_JAVA_FILES:.java=.class) |
||||
$(JAVADEP) $^
|
||||
|
||||
clean-local: |
||||
@rm -f *.class
|
||||
@rm -f *.dep
|
@ -0,0 +1,34 @@ |
||||
<?xml version="1.0" encoding="iso-8859-1"?> |
||||
|
||||
<!-- |
||||
Copyright (c) 2000 Michel CASABIANCA. All Rights Reserved. |
||||
|
||||
Permission to use, copy, modify, and distribute this software and its |
||||
documentation for any purpose and without fee or royalty is hereby |
||||
granted, provided that both the above copyright notice and this |
||||
permission notice appear in all copies of the software and |
||||
documentation or portions thereof, including modifications, that you |
||||
make. |
||||
|
||||
THIS SOFTWARE IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO |
||||
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, |
||||
BUT NOT LIMITATION, COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR |
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR |
||||
THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY |
||||
THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. |
||||
COPYRIGHT HOLDERS WILL BEAR NO LIABILITY FOR ANY USE OF THIS SOFTWARE |
||||
OR DOCUMENTATION. |
||||
--> |
||||
|
||||
<!-- project ext DTD for Ant --> |
||||
<!-- 2000-04-03 --> |
||||
|
||||
<!ENTITY % ext "| xt"> |
||||
|
||||
<!ELEMENT xt EMPTY> |
||||
<!ATTLIST xt |
||||
xml CDATA #REQUIRED |
||||
xsl CDATA #REQUIRED |
||||
out CDATA #REQUIRED> |
||||
|
||||
|
@ -0,0 +1,273 @@ |
||||
<?xml version="1.0" encoding="iso-8859-1"?> |
||||
|
||||
<!-- |
||||
Copyright (c) 2000 Michel CASABIANCA. All Rights Reserved. |
||||
|
||||
Permission to use, copy, modify, and distribute this software and its |
||||
documentation for any purpose and without fee or royalty is hereby |
||||
granted, provided that both the above copyright notice and this |
||||
permission notice appear in all copies of the software and |
||||
documentation or portions thereof, including modifications, that you |
||||
make. |
||||
|
||||
THIS SOFTWARE IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO |
||||
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, |
||||
BUT NOT LIMITATION, COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR |
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR |
||||
THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY |
||||
THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. |
||||
COPYRIGHT HOLDERS WILL BEAR NO LIABILITY FOR ANY USE OF THIS SOFTWARE |
||||
OR DOCUMENTATION. |
||||
--> |
||||
|
||||
<!-- project DTD for Ant --> |
||||
<!-- 2000-04-03 --> |
||||
|
||||
<!ENTITY % ext-file SYSTEM "project-ext.dtd"> |
||||
%ext-file; |
||||
|
||||
<!ELEMENT project (target | property)*> |
||||
<!ATTLIST project |
||||
name CDATA #REQUIRED |
||||
default CDATA #REQUIRED |
||||
basedir CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT target (ant | available | chmod | copydir | copyfile | |
||||
cvs | delete | deltree | echo | exec | expand | |
||||
filter | get | gzip | fixcrlf | jar | java | |
||||
javac | javadoc | javadoc2 | keysubst | mkdir | |
||||
property | rename | replace | rmic | tar | |
||||
taskdef | tstamp | zip %ext;)*> |
||||
<!ATTLIST target |
||||
name CDATA #REQUIRED |
||||
depends CDATA #IMPLIED |
||||
if CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT property EMPTY> |
||||
<!ATTLIST property |
||||
name CDATA #IMPLIED |
||||
value CDATA #IMPLIED |
||||
resource CDATA #IMPLIED |
||||
file CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT ant EMPTY> |
||||
<!ATTLIST ant |
||||
antfile CDATA #IMPLIED |
||||
dir CDATA #REQUIRED |
||||
target CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT available EMPTY> |
||||
<!ATTLIST available |
||||
property CDATA #REQUIRED |
||||
classname CDATA #REQUIRED |
||||
resource CDATA #REQUIRED |
||||
file CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT chmod EMPTY> |
||||
<!ATTLIST chmod |
||||
src CDATA #REQUIRED |
||||
perm CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT copydir EMPTY> |
||||
<!ATTLIST copydir |
||||
src CDATA #REQUIRED |
||||
dest CDATA #REQUIRED |
||||
ignore CDATA #IMPLIED |
||||
includes CDATA #IMPLIED |
||||
excludes CDATA #IMPLIED |
||||
defaultexcludes CDATA #IMPLIED |
||||
filtering CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT copyfile EMPTY> |
||||
<!ATTLIST copyfile |
||||
src CDATA #REQUIRED |
||||
dest CDATA #REQUIRED |
||||
filtering CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT cvs EMPTY> |
||||
<!ATTLIST cvs |
||||
cvsRoot CDATA #REQUIRED |
||||
dest CDATA #REQUIRED |
||||
package CDATA #REQUIRED |
||||
tag CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT delete EMPTY> |
||||
<!ATTLIST delete |
||||
file CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT deltree EMPTY> |
||||
<!ATTLIST deltree |
||||
dir CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT echo EMPTY> |
||||
<!ATTLIST echo |
||||
message CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT exec EMPTY> |
||||
<!ATTLIST exec |
||||
command CDATA #REQUIRED |
||||
dir CDATA #REQUIRED |
||||
os CDATA #IMPLIED |
||||
output CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT expand EMPTY> |
||||
<!ATTLIST expand |
||||
src CDATA #REQUIRED |
||||
dest CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT filter EMPTY> |
||||
<!ATTLIST filter |
||||
token CDATA #REQUIRED |
||||
value CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT get EMPTY> |
||||
<!ATTLIST get |
||||
src CDATA #REQUIRED |
||||
dest CDATA #REQUIRED |
||||
verbose CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT gzip EMPTY> |
||||
<!ATTLIST gzip |
||||
src CDATA #REQUIRED |
||||
zipfile CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT fixcrlf EMPTY> |
||||
<!ATTLIST fixcrlf |
||||
srcdir CDATA #REQUIRED |
||||
destDir CDATA #IMPLIED |
||||
includes CDATA #IMPLIED |
||||
excludes CDATA #IMPLIED |
||||
cr CDATA #IMPLIED |
||||
tab CDATA #IMPLIED |
||||
eof CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT jar EMPTY> |
||||
<!ATTLIST jar |
||||
jarfile CDATA #REQUIRED |
||||
basedir CDATA #REQUIRED |
||||
items CDATA #IMPLIED |
||||
ignore CDATA #IMPLIED |
||||
includes CDATA #IMPLIED |
||||
excludes CDATA #IMPLIED |
||||
defaultexcludes CDATA #IMPLIED |
||||
manifest CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT java EMPTY> |
||||
<!ATTLIST java |
||||
classname CDATA #REQUIRED |
||||
args CDATA #IMPLIED |
||||
fork CDATA #IMPLIED |
||||
jvmargs CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT javac EMPTY> |
||||
<!ATTLIST javac |
||||
srcdir CDATA #REQUIRED |
||||
destdir CDATA #REQUIRED |
||||
includes CDATA #IMPLIED |
||||
excludes CDATA #IMPLIED |
||||
defaultexcludes CDATA #IMPLIED |
||||
classpath CDATA #IMPLIED |
||||
bootclasspath CDATA #IMPLIED |
||||
extdirs CDATA #IMPLIED |
||||
debug CDATA #IMPLIED |
||||
optimize CDATA #IMPLIED |
||||
deprecation CDATA #IMPLIED |
||||
filtering CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT javadoc EMPTY> |
||||
<!ATTLIST javadoc |
||||
sourcepath CDATA #REQUIRED |
||||
destdir CDATA #REQUIRED |
||||
sourcefiles CDATA #IMPLIED |
||||
packagenames CDATA #IMPLIED |
||||
classpath CDATA #IMPLIED |
||||
bootclasspath CDATA #IMPLIED |
||||
extdirs CDATA #IMPLIED |
||||
overview CDATA #IMPLIED |
||||
public CDATA #IMPLIED |
||||
protected CDATA #IMPLIED |
||||
package CDATA #IMPLIED |
||||
private CDATA #IMPLIED |
||||
old CDATA #IMPLIED |
||||
verbose CDATA #IMPLIED |
||||
locale CDATA #IMPLIED |
||||
encoding CDATA #IMPLIED |
||||
version CDATA #IMPLIED |
||||
use CDATA #IMPLIED |
||||
author CDATA #IMPLIED |
||||
splitindex CDATA #IMPLIED |
||||
windowtitle CDATA #IMPLIED |
||||
doctitle CDATA #IMPLIED |
||||
header CDATA #IMPLIED |
||||
footer CDATA #IMPLIED |
||||
bottom CDATA #IMPLIED |
||||
link CDATA #IMPLIED |
||||
linkoffline CDATA #IMPLIED |
||||
group CDATA #IMPLIED |
||||
nodedeprecated CDATA #IMPLIED |
||||
nodedeprecatedlist CDATA #IMPLIED |
||||
notree CDATA #IMPLIED |
||||
noindex CDATA #IMPLIED |
||||
nohelp CDATA #IMPLIED |
||||
nonavbar CDATA #IMPLIED |
||||
serialwarn CDATA #IMPLIED |
||||
helpfile CDATA #IMPLIED |
||||
stylesheetfile CDATA #IMPLIED |
||||
charset CDATA #IMPLIED |
||||
docencoding CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT keysubst EMPTY> |
||||
<!ATTLIST keysubst |
||||
src CDATA #REQUIRED |
||||
dest CDATA #REQUIRED |
||||
sep CDATA #IMPLIED |
||||
keys CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT mkdir EMPTY> |
||||
<!ATTLIST mkdir |
||||
dir CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT rename EMPTY> |
||||
<!ATTLIST rename |
||||
src CDATA #REQUIRED |
||||
dest CDATA #REQUIRED |
||||
replace CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT replace EMPTY> |
||||
<!ATTLIST replace |
||||
file CDATA #REQUIRED |
||||
token CDATA #REQUIRED |
||||
value CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT rmic EMPTY> |
||||
<!ATTLIST rmic |
||||
base CDATA #REQUIRED |
||||
classname CDATA #REQUIRED |
||||
filtering CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT tar EMPTY> |
||||
<!ATTLIST tar |
||||
tarfile CDATA #REQUIRED |
||||
basedir CDATA #REQUIRED |
||||
includes CDATA #IMPLIED |
||||
excludes CDATA #IMPLIED |
||||
defaultexcludes CDATA #IMPLIED> |
||||
|
||||
<!ELEMENT taskdef EMPTY> |
||||
<!ATTLIST taskdef |
||||
name CDATA #REQUIRED |
||||
classname CDATA #REQUIRED> |
||||
|
||||
<!ELEMENT tstamp EMPTY> |
||||
|
||||
<!ELEMENT zip EMPTY> |
||||
<!ATTLIST zip |
||||
zipfile CDATA #REQUIRED |
||||
basedir CDATA #REQUIRED |
||||
items CDATA #IMPLIED |
||||
ignore CDATA #IMPLIED |
||||
includes CDATA #IMPLIED |
||||
excludes CDATA #IMPLIED |
||||
defaultexcludes CDATA #IMPLIED> |
||||
|
||||
|
@ -0,0 +1,192 @@ |
||||
foo |
||||
net/sf/jode/GlobalOptions.java |
||||
net/sf/jode/bytecode/ClassInfo.java |
||||
net/sf/jode/bytecode/BasicBlocks.java |
||||
net/sf/jode/bytecode/TransformSubroutine.java |
||||
net/sf/jode/bytecode/BasicBlockReader.java |
||||
net/sf/jode/bytecode/TypeInstruction.java |
||||
net/sf/jode/bytecode/SwitchInstruction.java |
||||
net/sf/jode/bytecode/BasicBlockWriter.java |
||||
net/sf/jode/bytecode/Block.java |
||||
net/sf/jode/bytecode/Handler.java |
||||
net/sf/jode/bytecode/ClassPath.java |
||||
net/sf/jode/bytecode/TypeSignature.java |
||||
net/sf/jode/bytecode/SlotInstruction.java |
||||
net/sf/jode/bytecode/LocalVariableInfo.java |
||||
net/sf/jode/bytecode/ClassFormatException.java |
||||
net/sf/jode/bytecode/ConstantInstruction.java |
||||
net/sf/jode/bytecode/TypeDimensionInstruction.java |
||||
net/sf/jode/bytecode/IncInstruction.java |
||||
net/sf/jode/bytecode/BinaryInfo.java |
||||
net/sf/jode/bytecode/Opcodes.java |
||||
net/sf/jode/bytecode/Subroutine.java |
||||
net/sf/jode/bytecode/ConstantPool.java |
||||
net/sf/jode/bytecode/MethodInfo.java |
||||
net/sf/jode/bytecode/Reference.java |
||||
net/sf/jode/bytecode/ReferenceInstruction.java |
||||
net/sf/jode/bytecode/Instruction.java |
||||
net/sf/jode/bytecode/FieldInfo.java |
||||
net/sf/jode/bytecode/GrowableConstantPool.java |
||||
net/sf/jode/decompiler/Applet.java |
||||
net/sf/jode/decompiler/TabbedPrintWriter.java |
||||
net/sf/jode/decompiler/LocalInfo.java |
||||
net/sf/jode/decompiler/OuterValues.java |
||||
net/sf/jode/decompiler/Declarable.java |
||||
net/sf/jode/decompiler/Scope.java |
||||
net/sf/jode/decompiler/Decompiler.java |
||||
net/sf/jode/decompiler/Main.java |
||||
net/sf/jode/decompiler/Window.java |
||||
net/sf/jode/decompiler/ClassAnalyzer.java |
||||
net/sf/jode/decompiler/OuterValueListener.java |
||||
net/sf/jode/decompiler/ImportHandler.java |
||||
net/sf/jode/decompiler/Analyzer.java |
||||
net/sf/jode/decompiler/Options.java |
||||
net/sf/jode/decompiler/ClassDeclarer.java |
||||
net/sf/jode/decompiler/MethodAnalyzer.java |
||||
net/sf/jode/decompiler/Opcodes.java |
||||
net/sf/jode/decompiler/ProgressListener.java |
||||
net/sf/jode/decompiler/FieldAnalyzer.java |
||||
net/sf/jode/expr/StringAddOperator.java |
||||
net/sf/jode/expr/CombineableOperator.java |
||||
net/sf/jode/expr/LValueExpression.java |
||||
net/sf/jode/expr/GetFieldOperator.java |
||||
net/sf/jode/expr/Expression.java |
||||
net/sf/jode/expr/CompareUnaryOperator.java |
||||
net/sf/jode/expr/LocalVarOperator.java |
||||
net/sf/jode/expr/ConstOperator.java |
||||
net/sf/jode/expr/UnaryOperator.java |
||||
net/sf/jode/expr/IfThenElseOperator.java |
||||
net/sf/jode/expr/BinaryOperator.java |
||||
net/sf/jode/expr/OuterLocalOperator.java |
||||
net/sf/jode/expr/NoArgOperator.java |
||||
net/sf/jode/expr/Operator.java |
||||
net/sf/jode/expr/CheckNullOperator.java |
||||
net/sf/jode/expr/IIncOperator.java |
||||
net/sf/jode/expr/ArrayLengthOperator.java |
||||
net/sf/jode/expr/LocalLoadOperator.java |
||||
net/sf/jode/expr/LocalStoreOperator.java |
||||
net/sf/jode/expr/ConvertOperator.java |
||||
net/sf/jode/expr/MonitorEnterOperator.java |
||||
net/sf/jode/expr/CompareToIntOperator.java |
||||
net/sf/jode/expr/NewOperator.java |
||||
net/sf/jode/expr/PutFieldOperator.java |
||||
net/sf/jode/expr/PrePostFixOperator.java |
||||
net/sf/jode/expr/MonitorExitOperator.java |
||||
net/sf/jode/expr/NewArrayOperator.java |
||||
net/sf/jode/expr/ShiftOperator.java |
||||
net/sf/jode/expr/CheckCastOperator.java |
||||
net/sf/jode/expr/StoreInstruction.java |
||||
net/sf/jode/expr/PopOperator.java |
||||
net/sf/jode/expr/ThisOperator.java |
||||
net/sf/jode/expr/ConstantArrayOperator.java |
||||
net/sf/jode/expr/ArrayLoadOperator.java |
||||
net/sf/jode/expr/InstanceOfOperator.java |
||||
net/sf/jode/expr/NopOperator.java |
||||
net/sf/jode/expr/FieldOperator.java |
||||
net/sf/jode/expr/InvokeOperator.java |
||||
net/sf/jode/expr/MatchableOperator.java |
||||
net/sf/jode/expr/SimpleOperator.java |
||||
net/sf/jode/expr/ArrayStoreOperator.java |
||||
net/sf/jode/expr/ClassFieldOperator.java |
||||
net/sf/jode/expr/CompareBinaryOperator.java |
||||
net/sf/jode/flow/StructuredBlock.java |
||||
net/sf/jode/flow/TryBlock.java |
||||
net/sf/jode/flow/CreateConstantArray.java |
||||
net/sf/jode/flow/CompleteSynchronized.java |
||||
net/sf/jode/flow/SlotSet.java |
||||
net/sf/jode/flow/SynchronizedBlock.java |
||||
net/sf/jode/flow/EmptyBlock.java |
||||
net/sf/jode/flow/CreateCheckNull.java |
||||
net/sf/jode/flow/CombineIfGotoExpressions.java |
||||
net/sf/jode/flow/CreateIfThenElseOperator.java |
||||
net/sf/jode/flow/Jump.java |
||||
net/sf/jode/flow/SequentialBlock.java |
||||
net/sf/jode/flow/CreateNewConstructor.java |
||||
net/sf/jode/flow/CaseBlock.java |
||||
net/sf/jode/flow/BreakBlock.java |
||||
net/sf/jode/flow/VariableSet.java |
||||
net/sf/jode/flow/CreateForInitializer.java |
||||
net/sf/jode/flow/TransformConstructors.java |
||||
net/sf/jode/flow/ReturnBlock.java |
||||
net/sf/jode/flow/VariableStack.java |
||||
net/sf/jode/flow/InstructionContainer.java |
||||
net/sf/jode/flow/IfThenElseBlock.java |
||||
net/sf/jode/flow/SwitchBlock.java |
||||
net/sf/jode/flow/CatchBlock.java |
||||
net/sf/jode/flow/CreateClassField.java |
||||
net/sf/jode/flow/ThrowBlock.java |
||||
net/sf/jode/flow/SpecialBlock.java |
||||
net/sf/jode/flow/FinallyBlock.java |
||||
net/sf/jode/flow/ContinueBlock.java |
||||
net/sf/jode/flow/BreakableBlock.java |
||||
net/sf/jode/flow/ConditionalBlock.java |
||||
net/sf/jode/flow/LoopBlock.java |
||||
net/sf/jode/flow/FlowBlock.java |
||||
net/sf/jode/flow/TransformExceptionHandlers.java |
||||
net/sf/jode/flow/CreateExpression.java |
||||
net/sf/jode/flow/JsrBlock.java |
||||
net/sf/jode/flow/CreatePrePostIncExpression.java |
||||
net/sf/jode/flow/DescriptionBlock.java |
||||
net/sf/jode/flow/InstructionBlock.java |
||||
net/sf/jode/flow/RetBlock.java |
||||
net/sf/jode/flow/CreateAssignExpression.java |
||||
net/sf/jode/jvm/Interpreter.java |
||||
net/sf/jode/jvm/NewObject.java |
||||
net/sf/jode/jvm/Value.java |
||||
net/sf/jode/jvm/InterpreterException.java |
||||
net/sf/jode/jvm/SyntheticAnalyzer.java |
||||
net/sf/jode/jvm/RuntimeEnvironment.java |
||||
net/sf/jode/jvm/SimpleRuntimeEnvironment.java |
||||
net/sf/jode/jvm/CodeVerifier.java |
||||
net/sf/jode/jvm/VerifyException.java |
||||
net/sf/jode/obfuscator/PackageIdentifier.java |
||||
net/sf/jode/obfuscator/Identifier.java |
||||
net/sf/jode/obfuscator/TranslationTable.java |
||||
net/sf/jode/obfuscator/MethodIdentifier.java |
||||
net/sf/jode/obfuscator/FieldIdentifier.java |
||||
net/sf/jode/obfuscator/Main.java |
||||
net/sf/jode/obfuscator/LocalIdentifier.java |
||||
net/sf/jode/obfuscator/CodeTransformer.java |
||||
net/sf/jode/obfuscator/CodeAnalyzer.java |
||||
net/sf/jode/obfuscator/OptionHandler.java |
||||
net/sf/jode/obfuscator/ParseException.java |
||||
net/sf/jode/obfuscator/ScriptParser.java |
||||
net/sf/jode/obfuscator/ClassBundle.java |
||||
net/sf/jode/obfuscator/ClassIdentifier.java |
||||
net/sf/jode/obfuscator/Renamer.java |
||||
net/sf/jode/obfuscator/ConstantRuntimeEnvironment.java |
||||
net/sf/jode/obfuscator/IdentifierMatcher.java |
||||
net/sf/jode/obfuscator/modules/StrongRenamer.java |
||||
net/sf/jode/obfuscator/modules/SerializePreserver.java |
||||
net/sf/jode/obfuscator/modules/ConstantAnalyzer.java |
||||
net/sf/jode/obfuscator/modules/SimpleAnalyzer.java |
||||
net/sf/jode/obfuscator/modules/WildCard.java |
||||
net/sf/jode/obfuscator/modules/LocalizeFieldTransformer.java |
||||
net/sf/jode/obfuscator/modules/KeywordRenamer.java |
||||
net/sf/jode/obfuscator/modules/NameSwapper.java |
||||
net/sf/jode/obfuscator/modules/LocalOptimizer.java |
||||
net/sf/jode/obfuscator/modules/RemovePopAnalyzer.java |
||||
net/sf/jode/obfuscator/modules/MultiIdentifierMatcher.java |
||||
net/sf/jode/obfuscator/modules/UniqueRenamer.java |
||||
net/sf/jode/obfuscator/modules/ModifierMatcher.java |
||||
net/sf/jode/obfuscator/modules/IdentityRenamer.java |
||||
net/sf/jode/swingui/Main.java |
||||
net/sf/jode/swingui/ClassPathDialog.java |
||||
net/sf/jode/swingui/HierarchyTreeModel.java |
||||
net/sf/jode/swingui/PackagesTreeModel.java |
||||
net/sf/jode/type/ReferenceType.java |
||||
net/sf/jode/type/NullType.java |
||||
net/sf/jode/type/SystemClassType.java |
||||
net/sf/jode/type/MethodType.java |
||||
net/sf/jode/type/ArrayType.java |
||||
net/sf/jode/type/RangeType.java |
||||
net/sf/jode/type/IntegerType.java |
||||
net/sf/jode/type/ClassType.java |
||||
net/sf/jode/type/Type.java |
||||
net/sf/jode/type/ClassInfoType.java |
||||
net/sf/jode/type/MultiClassType.java |
||||
net/sf/jode/util/SimpleMap.java |
||||
net/sf/jode/util/StringQuoter.java |
||||
net/sf/jode/util/ArrayEnum.java |
||||
net/sf/jode/util/UnifyHash.java |
||||
net/sf/jode/util/SimpleSet.java |
@ -0,0 +1,73 @@ |
||||
/* Subroutine Copyright (C) 2000 Jochen Hoenicke. |
||||
* |
||||
* This program is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation; either version 2, or (at your option) |
||||
* any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program; see the file COPYING. If not, write to |
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
||||
* |
||||
* $Id$ |
||||
*/ |
||||
|
||||
package net.sf.jode.bytecode; |
||||
|
||||
import java.io.PrintWriter; |
||||
///#def COLLECTIONS java.util
|
||||
import java.util.Collection; |
||||
import java.util.Arrays; |
||||
import java.util.List; |
||||
import java.util.Iterator; |
||||
///#enddef
|
||||
|
||||
/** |
||||
* <p>Represents a <code>jsr</code>-Subroutine.</p> |
||||
* |
||||
* <p>In my representation a subroutine consists of all blocks from |
||||
* which the ret instruction is reachable. Every subroutine must have |
||||
* a reachable ret instruction, or the jsr is replaced by a simple goto. |
||||
* </p> |
||||
* |
||||
* @author Jochen Hoenicke |
||||
* @see net.sf.jode.bytecode.BasicBlocks |
||||
* @see net.sf.jode.bytecode.Block |
||||
*/ |
||||
public final class Subroutine { |
||||
/** |
||||
* Subroutines may be nested. This points to the outer subroutine |
||||
* or to null if this doesn't have an outer. |
||||
*/ |
||||
private Subroutine outer; |
||||
|
||||
/** |
||||
* Each subroutine has exactly one ret instruction, which is the |
||||
* last instruction in the retBlock. The local of the ret |
||||
* instruction must equal the local where the first instruction of |
||||
* the subroutine stores to. |
||||
*/ |
||||
private Block retBlock; |
||||
|
||||
/** |
||||
* The set of locals that are accessed inside this subroutine. |
||||
*/ |
||||
private BitSet accessedLocals; |
||||
|
||||
public Block getRetBlock() { |
||||
return retBlock; |
||||
} |
||||
|
||||
public Subroutine getOuter() { |
||||
return outer; |
||||
} |
||||
|
||||
public boolean isAccessed(int slot) { |
||||
return accessedLocals.get(slot); |
||||
} |
||||
} |
@ -0,0 +1,228 @@ |
||||
/* TransformSubroutine Copyright (C) 1999-2000 Jochen Hoenicke. |
||||
* |
||||
* This program is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation; either version 2, or (at your option) |
||||
* any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program; see the file COPYING. If not, write to |
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
||||
* |
||||
* $Id$ |
||||
*/ |
||||
|
||||
package net.sf.jode.bytecode; |
||||
import java.util.BitSet; |
||||
|
||||
/** |
||||
* <p>This class contains some code to transform the subroutines of |
||||
* a method into a normal form. The normal form is as following.</p> |
||||
* |
||||
* <p>Each subroutine block, meaning a block where some jsr |
||||
* instructions may jump to, must store the return address in a local |
||||
* variable immediately. There must be exactly one block with the |
||||
* corresponding <code>opc_ret</code> instruction and this block must |
||||
* be reachable from all blocks that belong to this subroutine. </b> |
||||
* |
||||
* <p>The JVM spec allows a subroutine, to leave the return address on |
||||
* stack for a while, even longer than the subroutine actually exists. |
||||
* One can also pop that value instead of storing it in a local |
||||
* variable. And finally its possible to store it in a variable, but |
||||
* there exists no reachable <code>opc_ret</code> instruction that returns |
||||
* to that address.</p> |
||||
* |
||||
* <p>If the return address is not used by the subroutine, we simply |
||||
* replace the jsr by a jump and remove the pop/store instruction that |
||||
* popped the return address.</p> |
||||
* |
||||
* <p>If the return address is used, but not immediately stored, we simply |
||||
* move the corresponding astore to the start of the subroutine.</p> |
||||
* |
||||
* @see net.sf.jode.bytecode.Block |
||||
* @see net.sf.jode.bytecode.Instruction |
||||
*/ |
||||
public class TransformSubroutine implements Opcodes { |
||||
private final static int SUBSTATUS_SUBROUTINE = 1; |
||||
private final static int SUBSTATUS_REMOVEDSUB = 2; |
||||
private final static int SUBSTATUS_NOTSUB = 3; |
||||
private final static int SUBSTATUS_INPROGRESS = 4; |
||||
|
||||
BasicBlocks bb; |
||||
Blocks[] blocks; |
||||
byte[] substatus; |
||||
Subroutine[] subInfo; |
||||
|
||||
// {
|
||||
// for (int i=0; i < blocks.length; i++) {
|
||||
// Instructions[] instrs = blocks[i].getInstructions();
|
||||
// if (instrs[instrs.length-1].getOpcode() == opc_jsr) {
|
||||
// int srBlock = instrs.getSuccs()[0].getBlockNr();
|
||||
// if (substatus[srBlock] == 0)
|
||||
// analyzeSubroutine(srBlock);
|
||||
// if (substatus[srBlock] == SUBSTATUS_REMOVED) {
|
||||
// Instructions[] newInstrs
|
||||
// = new Instruction[instrs.length-1];
|
||||
// System.arraycopy(instrs, 0, newInstrs, 0,
|
||||
// newInstrs.length);
|
||||
// Block[] newSuccs = new Block[1] { instrs.getSuccs()[1]; };
|
||||
// blocks[i].setCode(newInstrs, newSuccs);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
class SubroutineInfo { |
||||
int retPosition; |
||||
BitSet accessedLocals; |
||||
SubroutineInfo outer; |
||||
|
||||
SubroutineInfo(int retPos, Bitset accLocals, SubroutineInfo outer) { |
||||
this.outer = outer; |
||||
this.retPosition = retPos; |
||||
this.accessedLocals = accLocals; |
||||
} |
||||
|
||||
boolean merge(int retPos, BitSet accLocals, SubroutineInfo outer) { |
||||
if ((retPos < 0 || this.retPosition < 0) |
||||
&& retPos != this.retPosition) |
||||
throw new |
||||
} |
||||
} |
||||
|
||||
public TransformSubroutine(BasicBlocks bb) |
||||
throws ClassFormatException |
||||
{ |
||||
if (bb.getStartBlock() == null) |
||||
return; |
||||
|
||||
blocks = bb.getBlocks(); |
||||
substatus = new byte[blocks.length]; |
||||
analyzeBlock(blockNr, SUBSTATUS_NOTSUB, null); |
||||
} |
||||
|
||||
public void analyzeBlock(int blockNr, int status, SubroutineInfo outer, |
||||
BitSet retsOnStack) { |
||||
Block block = blocks[blockNr]; |
||||
if (status == SUBSTATUS_INPROGRESS) { |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
public void analyzeBlock(int blockNr, int status, SubroutineInfo outer) { |
||||
substatus[blockNr] = status; |
||||
accessedLocals[blockNr] = accessed; |
||||
Stack todo = new Stack(); |
||||
|
||||
todo.add(new BlockInfo(startBlockNr, 0, null)); |
||||
while (!todo.isEmpty()) { |
||||
BlockInfo info = todo.pop(); |
||||
Block block = blocks[info.blockNr]; |
||||
Instruction[] instrs = block.getInstructions(); |
||||
Instruction[] newInstrs = null; |
||||
Block[] succs = block.getSuccessors(); |
||||
|
||||
|
||||
if (substatus[info.blockNr] |
||||
== SUBSTATUS_INPROGRESS) { |
||||
int retPosition = info.retPosition; |
||||
BitSet = |
||||
retPosition < 0 ? info.accessedLocals.clone() : null; |
||||
|
||||
for (int i = 0; i < instrs.length; i++) { |
||||
Instruction instr = instrs[i]; |
||||
if (instr instanceof SlotInstruction) { |
||||
if (instr.getOpcode() == opc_astore |
||||
&& retPosition == -1) { |
||||
|
||||
/* We found the store operation. At least |
||||
* a candidate, since there may not be a |
||||
* corresponding ret. |
||||
*/ |
||||
|
||||
retPosition = instr.getLocalSlot(); |
||||
accessedLocals = null; |
||||
/* remove store Instruction. |
||||
*/ |
||||
newInstrs = new Instruction[instrs.length - 1]; |
||||
System.arraycopy(instrs, 0, newInstrs, 0, i); |
||||
System.arraycopy(instrs, i+1, newInstrs, i, |
||||
newInstrs.length - i); |
||||
|
||||
} else { |
||||
if (retPosition < 0) { |
||||
accessedLocals.add(instr.getLocalSlot()); |
||||
switch (instr.getOpcode()) { |
||||
case opc_lload: |
||||
case opc_dload: |
||||
case opc_lstore: |
||||
case opc_dstore: |
||||
accessedLocals.add(instr.getLocalSlot()+1); |
||||
} |
||||
} |
||||
} |
||||
} else if (instr.getOpcode() == opc_pop |
||||
&& retPosition == -1) { |
||||
/* We spontanously left the subroutine by popping. |
||||
* Remove the pop Instruction. |
||||
*/ |
||||
newInstrs = new Instruction[instrs.length - 1]; |
||||
System.arraycopy(instrs, 0, newInstrs, 0, i); |
||||
System.arraycopy(instrs, i+1, newInstrs, i, |
||||
newInstrs.length - i); |
||||
substatus[info.blockNr] = SUBSTATUS_NOTSUB; |
||||
break; |
||||
} else if ((instr.getOpcode() == opc_pop2 && |
||||
(retPosition == -1 || retPosition == -2))) { |
||||
/* We spontanously left the subroutine by popping. |
||||
* Replace the pop2 with a pop. |
||||
*/ |
||||
newInstrs = new Instruction[instrs.length]; |
||||
System.arraycopy(instrs, 0, newInstrs, 0, |
||||
instrs.length); |
||||
newInstrs[i] = Instruction.forOpcode(opc_pop); |
||||
substatus[info.blockNr] = SUBSTATUS_NOTSUB; |
||||
break; |
||||
} else if (instr.getOpcode() == opc_jsr) { |
||||
/* A recursive subroutine (or have we already |
||||
* spontanously left this subroutine?) |
||||
*/ |
||||
int srBlock = instrs.getSuccs()[0].getBlockNr(); |
||||
if (substatus[srBlock] == 0) |
||||
analyzeSubroutine(srBlock); |
||||
if (substatus[srBlock] == SUBSTATUS_INPROGRESS) { |
||||
/* We spontanously left this subroutine! */ |
||||
if (retPosition < 0) |
||||
/* This can't happen in valid code. |
||||
*/ |
||||
throw new CodeFormatException |
||||
("Can't merge return instr on Stack."); |
||||
substatus[info.blockNr] = SUBSTATUS_NOTSUB; |
||||
} |
||||
leftSub = true; |
||||
break; |
||||
} else if (substatus[srBlock] == SUBSTATUS_REMOVED) { |
||||
Instructions[] newInstrs |
||||
= new Instruction[instrs.length-1]; |
||||
System.arraycopy(instrs, 0, newInstrs, 0, |
||||
newInstrs.length); |
||||
Block[] newSuccs = new Block[1] { instrs.getSuccs()[1]; }; |
||||
blocks[i].setCode(newInstrs, newSuccs); |
||||
} |
||||
} |
||||
} |
||||
if (!leftSub) { |
||||
|
||||
|
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue