aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--luxc/src/lux/compiler/jvm/function.clj9
1 files changed, 3 insertions, 6 deletions
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 "<init>" (function-<init>-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)))