aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
authorEduardo Julian2016-12-21 23:17:22 -0400
committerEduardo Julian2016-12-21 23:17:22 -0400
commitca8c544b812c3cc4c7bb8cf509b1eb30a2484a4c (patch)
tree21aa722da5e36b52a5c1b2c9ee33c6e90c51d4a0 /luxc
parentcb48b5b27d54fb2a831d93b84f0e4131b25e58f3 (diff)
- Fixed a bug when decoding nat numbers in the compiler.
Diffstat (limited to 'luxc')
-rw-r--r--luxc/src/lux/compiler/host.clj4
1 files changed, 2 insertions, 2 deletions
diff --git a/luxc/src/lux/compiler/host.clj b/luxc/src/lux/compiler/host.clj
index 26fbda4db..4eba0a294 100644
--- a/luxc/src/lux/compiler/host.clj
+++ b/luxc/src/lux/compiler/host.clj
@@ -1106,7 +1106,7 @@
;; Remove the + at the beginning...
(.visitVarInsn Opcodes/ALOAD 0)
(.visitLdcInsn (int 0))
- (.visitLdcInsn (int 0))
+ (.visitLdcInsn (int 1))
(.visitMethodInsn Opcodes/INVOKEVIRTUAL "java/lang/String" "substring" "(II)Ljava/lang/String;")
(.visitLdcInsn "+")
(.visitMethodInsn Opcodes/INVOKEVIRTUAL "java/lang/Object" "equals" "(Ljava/lang/Object;)Z")
@@ -1444,7 +1444,7 @@
_ (doto (.visitMethod =class (+ Opcodes/ACC_PUBLIC Opcodes/ACC_STATIC) "make_some" "(Ljava/lang/Object;)Ljava/lang/Object;" nil nil)
(.visitCode)
(.visitLdcInsn (->> #'&/$Some meta ::&/idx int)) ;; I
- (.visitInsn Opcodes/ACONST_NULL) ;; I?
+ (.visitLdcInsn "") ;; I?
(.visitVarInsn Opcodes/ALOAD 0) ;; I?O
(.visitMethodInsn Opcodes/INVOKESTATIC "lux/LuxRT" "sum_make" "(ILjava/lang/Object;Ljava/lang/Object;)[Ljava/lang/Object;")
(.visitInsn Opcodes/ARETURN)