diff options
author | Rich Hickey <richhickey@gmail.com> | 2008-10-15 17:07:55 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2008-10-15 17:07:55 +0000 |
commit | be542947ad5a96930fca37b760c93eb5ced10950 (patch) | |
tree | 5d195fe2b4598663f722397e833f17a09ca310b1 /src/jvm | |
parent | 0809bec15d3dee4a81687bf7c1e399bf3c8d817d (diff) |
fixed (read r nil ...)
added args to update-in
removed interim use of gen dir
Diffstat (limited to 'src/jvm')
-rw-r--r-- | src/jvm/clojure/lang/Compiler.java | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java index 06c7606d..54846e05 100644 --- a/src/jvm/clojure/lang/Compiler.java +++ b/src/jvm/clojure/lang/Compiler.java @@ -2936,7 +2936,7 @@ static public class FnExpr implements Expr{ fn.constants = (PersistentVector) CONSTANTS.get(); fn.constantsID = RT.nextID(); DynamicClassLoader loader = (DynamicClassLoader) LOADER.get(); - //loader.registerConstants(fn.constantsID, fn.constants.toArray()); + loader.registerConstants(fn.constantsID, fn.constants.toArray()); } finally { @@ -3158,28 +3158,29 @@ static public class FnExpr implements Expr{ loader = (DynamicClassLoader) LOADER.get(); bytecode = cw.toByteArray(); - String path = "gen" + File.separator + internalName + ".class"; - File cf = new File(path); - cf.getParentFile().mkdirs(); - cf.createNewFile(); - OutputStream cfs = new FileOutputStream(cf); - try - { - cfs.write(bytecode); - } - finally - { - cfs.close(); - } +// String path = "gen" + File.separator + internalName + ".class"; +// File cf = new File(path); +// cf.getParentFile().mkdirs(); +// cf.createNewFile(); +// OutputStream cfs = new FileOutputStream(cf); +// try +// { +// cfs.write(bytecode); +// } +// finally +// { +// cfs.close(); +// } } synchronized Class getCompiledClass(){ if(compiledClass == null) try { - compiledClass = RT.classForName(name);//loader.defineClass(name, bytecode); + //compiledClass = RT.classForName(name);//loader.defineClass(name, bytecode); + compiledClass = loader.defineClass(name, bytecode); } - catch(ClassNotFoundException e) + catch(Exception e) { throw new RuntimeException(e); } |