From 3add4d6996591897020236b5581f6ca21d4c2af8 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 4 Sep 2017 21:41:49 -0400 Subject: - Now using strict floating point math on the JVM. --- luxc/src/lux/compiler/jvm/function.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'luxc/src') diff --git a/luxc/src/lux/compiler/jvm/function.clj b/luxc/src/lux/compiler/jvm/function.clj index 83c1fb95c..14ad9884f 100644 --- a/luxc/src/lux/compiler/jvm/function.clj +++ b/luxc/src/lux/compiler/jvm/function.clj @@ -106,7 +106,7 @@ (.visitMaxs 0 0) (.visitEnd)))) -(let [impl-flags (+ Opcodes/ACC_PUBLIC Opcodes/ACC_FINAL)] +(let [impl-flags (+ Opcodes/ACC_PUBLIC Opcodes/ACC_FINAL Opcodes/ACC_STRICT)] (defn ^:private add-function-impl [^ClassWriter class class-name compile arity impl-body] (let [$begin (new Label)] (&/with-writer (doto (.visitMethod class impl-flags "impl" (function-impl-signature arity) nil nil) @@ -165,7 +165,7 @@ $labels* (map (fn [_] (new Label)) (repeat num-partials nil)) $labels (vec (concat $labels* (list $default))) $end (new Label) - method-writer (.visitMethod class-writer Opcodes/ACC_PUBLIC &&/apply-method (&&/apply-signature +degree+) nil nil) + method-writer (.visitMethod class-writer (+ Opcodes/ACC_PUBLIC Opcodes/ACC_STRICT) &&/apply-method (&&/apply-signature +degree+) nil nil) frame-locals (to-array (list class-name "java/lang/Object" "java/lang/Object")) frame-stack (to-array [Opcodes/INTEGER]) arity-over-extent (- arity +degree+)] @@ -221,7 +221,7 @@ (.visitEnd)) (return nil))) (let [$begin (new Label)] - (&/with-writer (doto (.visitMethod ^ClassWriter class-writer Opcodes/ACC_PUBLIC &&/apply-method (&&/apply-signature 1) nil nil) + (&/with-writer (doto (.visitMethod ^ClassWriter class-writer (+ Opcodes/ACC_PUBLIC Opcodes/ACC_STRICT) &&/apply-method (&&/apply-signature 1) nil nil) (.visitCode) (.visitLabel $begin)) (|do [^MethodVisitor *writer* &/get-writer -- cgit v1.2.3