diff options
Diffstat (limited to 'src/lux/compiler/lux.clj')
-rw-r--r-- | src/lux/compiler/lux.clj | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lux/compiler/lux.clj b/src/lux/compiler/lux.clj index f6abed570..edafc67e2 100644 --- a/src/lux/compiler/lux.clj +++ b/src/lux/compiler/lux.clj @@ -75,15 +75,19 @@ (defn compile-variant [compile ?tag ?value] (|do [^MethodVisitor *writer* &/get-writer :let [_ (doto *writer* - (.visitLdcInsn (int 2)) + (.visitLdcInsn (int 3)) (.visitTypeInsn Opcodes/ANEWARRAY "java/lang/Object") (.visitInsn Opcodes/DUP) (.visitLdcInsn (int 0)) + (.visitFieldInsn Opcodes/GETSTATIC &&/lux-utils-class &&/sum-tag-field "Ljava/lang/String;") + (.visitInsn Opcodes/AASTORE) + (.visitInsn Opcodes/DUP) + (.visitLdcInsn (int 1)) (.visitLdcInsn ?tag) (&&/wrap-long) (.visitInsn Opcodes/AASTORE) (.visitInsn Opcodes/DUP) - (.visitLdcInsn (int 1)))] + (.visitLdcInsn (int 2)))] _ (compile ?value) :let [_ (.visitInsn *writer* Opcodes/AASTORE)]] (return nil))) |