diff options
author | Eduardo Julian | 2019-12-27 00:51:00 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-12-27 00:51:00 -0400 |
commit | 581ccee156457b0f84696def59fc324c1cbbdaba (patch) | |
tree | 0202c9a26d65920eeaabecffb810b5be0bc8a15d /luxc | |
parent | 9e6725e3fd45ad0b8faf54ec00ca9dcb8b603e32 (diff) |
Falling back to using the old method of JVM generation while I properly debug and optimize the new one.
Diffstat (limited to '')
-rw-r--r-- | luxc/src/lux/compiler/jvm/function.clj | 9 |
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))) |