aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEduardo Julian2016-03-15 01:03:39 -0400
committerEduardo Julian2016-03-15 01:03:39 -0400
commite4888ad775fad093cd16f6134d6c509a664996ff (patch)
tree3307b34a4f43402f8cecffa1ee5c52981723fc18 /src
parent3baa6d87f9e0be009c5b23f0702da368ceab13a3 (diff)
- Fixed a bug in the way sub-indices for sub-tuples were being calculated when doing product_getLeft.
Diffstat (limited to 'src')
-rw-r--r--src/lux/compiler/host.clj4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lux/compiler/host.clj b/src/lux/compiler/host.clj
index 0715b024f..b94dc0e7c 100644
--- a/src/lux/compiler/host.clj
+++ b/src/lux/compiler/host.clj
@@ -892,8 +892,8 @@
(.visitLdcInsn (int 1)) ;; tuple-size, index, offset-last-elem
(.visitInsn Opcodes/IADD) ;; tuple-size, index-last-elem
(.visitInsn Opcodes/DUP2) ;; tuple-size, index-last-elem, tuple-size, index-last-elem
- (.visitJumpInsn Opcodes/IF_ICMPGT $not-rec)
- ;; tuple-size, index-last-elem
+ (.visitJumpInsn Opcodes/IF_ICMPGT $not-rec) ;; tuple-size, index-last-elem
+ (.visitInsn Opcodes/SWAP) ;; index-last-elem, tuple-size
(.visitInsn Opcodes/ISUB) ;; sub-index
(.visitVarInsn Opcodes/ALOAD 0) ;; sub-index, tuple
(.visitInsn Opcodes/DUP) ;; sub-index, tuple, tuple