From 581ccee156457b0f84696def59fc324c1cbbdaba Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 27 Dec 2019 00:51:00 -0400 Subject: Falling back to using the old method of JVM generation while I properly debug and optimize the new one. --- luxc/src/lux/compiler/jvm/function.clj | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'luxc/src') diff --git a/luxc/src/lux/compiler/jvm/function.clj b/luxc/src/lux/compiler/jvm/function.clj index 14ad9884f..551f0851c 100644 --- a/luxc/src/lux/compiler/jvm/function.clj +++ b/luxc/src/lux/compiler/jvm/function.clj @@ -164,7 +164,6 @@ $default (new Label) $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 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]) @@ -186,7 +185,7 @@ (consecutive-args 1 +degree+) (fill-nulls! (- (- num-partials +degree+) stage)) (.visitMethodInsn Opcodes/INVOKESPECIAL class-name "" (function--signature env arity)) - (.visitJumpInsn Opcodes/GOTO $end)) + (.visitInsn Opcodes/ARETURN)) (->> (cond (= stage arity-over-extent) (doto method-writer (.visitLabel $label) @@ -197,7 +196,7 @@ (->> (dotimes [idx stage]))) (consecutive-args 1 +degree+) (.visitMethodInsn Opcodes/INVOKEVIRTUAL class-name "impl" (function-impl-signature arity)) - (.visitJumpInsn Opcodes/GOTO $end)) + (.visitInsn Opcodes/ARETURN)) (> stage arity-over-extent) (let [args-to-completion (- arity stage) @@ -211,12 +210,10 @@ (consecutive-args 1 args-to-completion) (.visitMethodInsn Opcodes/INVOKEVIRTUAL class-name "impl" (function-impl-signature arity)) (consecutive-applys (+ 1 args-to-completion) args-left) - (.visitJumpInsn Opcodes/GOTO $end))) + (.visitInsn Opcodes/ARETURN))) :else) (doseq [[stage $label] (map vector (range arity) $labels)]))) - (.visitLabel $end) - (.visitInsn Opcodes/ARETURN) (.visitMaxs 0 0) (.visitEnd)) (return nil))) -- cgit v1.2.3