From: Toby A. <tob...@pe...> - 2004-07-19 23:32:25
|
Your changes made things much better, but I still needed to make the following changes to get serialisation to work correctly for me: Index: src/jsint/DynamicVariable.java =================================================================== RCS file: /cvsroot/jscheme/jscheme/src/jsint/DynamicVariable.java,v retrieving revision 1.6 diff -u -r1.6 DynamicVariable.java --- src/jsint/DynamicVariable.java 16 Jul 2004 22:02:13 -0000 1.6 +++ src/jsint/DynamicVariable.java 19 Jul 2004 23:27:15 -0000 @@ -59,10 +59,10 @@ out.writeObject(name); try { - out.writeObject(getDynamicValue()); + out.writeObject(value); } catch (java.io.IOException e) { System.out.println("Exception trying to serialize " + - getDynamicValue() + ": " + e); + value + ": " + e); throw e; } } @@ -78,7 +78,7 @@ **/ private Object readResolve() throws java.io.ObjectStreamException { DynamicVariable it = Scheme.getInteractionEnvironment().intern(name); - if (it.value != U.UNDEFINED) it.value = value; + if (value != U.UNDEFINED) it.value = value; return it; } The first change means that it won't barf when trying to serialise Javadot values that refer to classes that aren't available in the environment in which serialisation is taking place. The second change just corrects a typo, I think. Without it deserialised DynamicVariables are always undefined. Toby. On Fri, Jul 16, 2004 at 06:10:09PM -0400, Ken Anderson wrote: > I just made the changes for this. > The Gabriel benchmarks show a 3% improvement. > I should have tried your benchmark. > > Toby, > Can you test serialization and see if your patch is still needed. > > k |