Revision: b892d7b827
Author: Michael Bayne <m...@samskivert.com>
Date: Sat Nov 27 12:26:11 2010
Log: Use a unique property name for the ductile-only test directory.
http://code.google.com/p/ductilej/source/detail?r=b892d7b827
Revision: ea1947183d
Author: Michael Bayne <m...@samskivert.com>
Date: Sat Nov 27 12:26:33 2010
Log: And a unique directory name.
http://code.google.com/p/ductilej/source/detail?r=ea1947183d
Revision: f8c41a2bb8
Author: Michael Bayne <m...@samskivert.com>
Date: Sat Nov 27 12:27:58 2010
Log: We need to fall back to lenient method resolution when type-correct
re...
http://code.google.com/p/ductilej/source/detail?r=f8c41a2bb8
==============================================================================
Revision: b892d7b827
Author: Michael Bayne <m...@samskivert.com>
Date: Sat Nov 27 12:26:11 2010
Log: Use a unique property name for the ductile-only test directory.
http://code.google.com/p/ductilej/source/detail?r=b892d7b827
Modified:
/build.xml
=======================================
--- /build.xml Sat Nov 27 12:15:19 2010
+++ /build.xml Sat Nov 27 12:26:11 2010
@@ -4,7 +4,6 @@
<property name="tsrc.dir" value="src/test/java"/>
<property name="deploy.dir" value="dist"/>
<property name="classes.dir" value="${deploy.dir}/classes"/>
- <property name="dtclass.dir" value="${deploy.dir}/dtclass"/>
<!-- read in the desired configuration local configuration -->
<property file="build.properties"/>
@@ -89,6 +88,7 @@
<target name="test-ductile" depends="compile"
description="Compiles and runs the unit tests (with detyper).">
+ <property name="dtclass.dir" value="${deploy.dir}/dtclass"/>
<delete dir="${dtclass.dir}"/>
<mkdir dir="${dtclass.dir}"/>
@@ -163,16 +163,17 @@
<target name="test-ductile-only" depends="compile"
description="Compiles and runs the Ductile-only unit tests.">
- <delete dir="${dtclass.dir}"/>
- <mkdir dir="${dtclass.dir}"/>
+ <property name="dotclass.dir" value="${deploy.dir}/dtclass"/>
+ <delete dir="${dotclass.dir}"/>
+ <mkdir dir="${dotclass.dir}"/>
<!-- allows passing -Dtest=NamePrefix to restrict to subset of tests
-->
<property name="test" value=""/>
<javac fork="yes" executable="${javac.home}/bin/javac" debug="on"
source="1.6" target="1.6" encoding="utf-8"
includeAntRuntime="no"
- srcdir="${tsrc.dir}" destdir="${dtclass.dir}">
+ srcdir="${tsrc.dir}" destdir="${dotclass.dir}">
<classpath>
- <pathelement location="${dtclass.dir}"/>
+ <pathelement location="${dotclass.dir}"/>
<path refid="build.classpath"/>
</classpath>
<compilerarg value="-J-ea"/>
@@ -193,7 +194,7 @@
<junit printsummary="off" haltonfailure="yes" fork="${junit.fork}">
<classpath>
<pathelement location="${classes.dir}"/>
- <pathelement location="${dtclass.dir}"/>
+ <pathelement location="${dotclass.dir}"/>
<path refid="build.classpath"/>
</classpath>
<assertions><enable/></assertions>
==============================================================================
Revision: ea1947183d
Author: Michael Bayne <m...@samskivert.com>
Date: Sat Nov 27 12:26:33 2010
Log: And a unique directory name.
http://code.google.com/p/ductilej/source/detail?r=ea1947183d
Modified:
/build.xml
=======================================
--- /build.xml Sat Nov 27 12:26:11 2010
+++ /build.xml Sat Nov 27 12:26:33 2010
@@ -163,7 +163,7 @@
<target name="test-ductile-only" depends="compile"
description="Compiles and runs the Ductile-only unit tests.">
- <property name="dotclass.dir" value="${deploy.dir}/dtclass"/>
+ <property name="dotclass.dir" value="${deploy.dir}/dotclass"/>
<delete dir="${dotclass.dir}"/>
<mkdir dir="${dotclass.dir}"/>
==============================================================================
Revision: f8c41a2bb8
Author: Michael Bayne <m...@samskivert.com>
Date: Sat Nov 27 12:27:58 2010
Log: We need to fall back to lenient method resolution when type-correct
resolution
fails. Time to ressurect the code I had before I went down the path of
making
Ductile (as) perfectly (as possible) mimic Java semantics for type-correct
code.
http://code.google.com/p/ductilej/source/detail?r=f8c41a2bb8
Modified:
/src/main/java/org/ductilej/detyper/Detype.java
/src/main/java/org/ductilej/detyper/Resolver.java
=======================================
--- /src/main/java/org/ductilej/detyper/Detype.java Sat Nov 27 12:15:19 2010
+++ /src/main/java/org/ductilej/detyper/Detype.java Sat Nov 27 12:27:58 2010
@@ -815,7 +815,6 @@
String invokeName;
JCExpression recv;
if (!mi.isValid()) {
- Debug.temp("Coping with invalid method invocation", "site",
mi.site, "msym", mi.msym);
// if we were unable to resolve the target method, try some
fallback heuristics to
// determine whether it has a static or non-static receiver
if (tree.meth instanceof JCFieldAccess) {
@@ -829,6 +828,7 @@
}
} else {
if (inStatic()) {
+ String fqName =
_env.enclClass.sym.getQualifiedName().toString();
recv = classLiteral(mkFA(fqName, tree.pos), tree.pos);
invokeName = "invokeStatic";
} else {
=======================================
--- /src/main/java/org/ductilej/detyper/Resolver.java Sat Nov 27 12:15:19
2010
+++ /src/main/java/org/ductilej/detyper/Resolver.java Sat Nov 27 12:27:58
2010
@@ -188,6 +188,7 @@
// Debug.temp("Resolving " + mname + "<" + mi.tatypes
+ ">(" + mi.atypes + ")");
mi.msym = invoke(env, Backdoor.resolveConstructor,
_resolve, mexpr.pos(),
aenv, mi.site, mi.atypes, mi.tatypes);
+ // TODO: if the type-correct resolver failed, fall back to
looser resolution
mi.varArgs = Backdoor.varArgs.get(aenv.info);
} else {
@@ -209,6 +210,7 @@
steps = steps.tail;
}
}
+ // TODO: if the type-correct resolver failed, fall back to
looser resolution
}
if (mi.msym.kind >= Kinds.ERR) {
Debug.log("Unable to resolve method", "expr",
mexpr, "site", mi.site,