diff options
author | Alan Dipert <alan@dipert.org> | 2010-12-21 17:21:18 -0500 |
---|---|---|
committer | Stuart Halloway <stu@thinkrelevance.com> | 2011-01-04 21:50:52 -0500 |
commit | b43bf20e1ba864c817ada237042cfdc8922831c0 (patch) | |
tree | 0906122821313553155f52c2aea1e7298fa9a3f1 | |
parent | 9052ca1854b7b6202dba21fe2a45183a4534c501 (diff) |
#697 Added a system property and compiler binding for *unchecked-math*
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
-rw-r--r-- | src/jvm/clojure/lang/Compile.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jvm/clojure/lang/Compile.java b/src/jvm/clojure/lang/Compile.java index 81d1c811..6c9c600b 100644 --- a/src/jvm/clojure/lang/Compile.java +++ b/src/jvm/clojure/lang/Compile.java @@ -24,9 +24,11 @@ public class Compile{ private static final String PATH_PROP = "clojure.compile.path"; private static final String REFLECTION_WARNING_PROP = "clojure.compile.warn-on-reflection"; +private static final String UNCHECKED_MATH_PROP = "clojure.compile.unchecked-math"; private static final Var compile_path = RT.var("clojure.core", "*compile-path*"); private static final Var compile = RT.var("clojure.core", "compile"); private static final Var warn_on_reflection = RT.var("clojure.core", "*warn-on-reflection*"); +private static final Var unchecked_math = RT.var("clojure.core", "*unchecked-math*"); public static void main(String[] args) throws Exception{ @@ -44,10 +46,11 @@ public static void main(String[] args) throws Exception{ } boolean warnOnReflection = System.getProperty(REFLECTION_WARNING_PROP, "false").equals("true"); + boolean uncheckedMath = System.getProperty(UNCHECKED_MATH_PROP, "false").equals("true"); try { - Var.pushThreadBindings(RT.map(compile_path, path, warn_on_reflection, warnOnReflection)); + Var.pushThreadBindings(RT.map(compile_path, path, warn_on_reflection, warnOnReflection, unchecked_math, uncheckedMath)); for(String lib : args) { |