From af3e6e2cb011dc2ad9204440990731a2f272716d Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 12 Jun 2021 01:32:40 -0400 Subject: Constraining the year of the snapshot time in Aedifex. --- lux-jvm/source/luxc/lang/host/jvm/inst.lux | 86 +++++++++++++++--------------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'lux-jvm/source/luxc/lang/host/jvm/inst.lux') diff --git a/lux-jvm/source/luxc/lang/host/jvm/inst.lux b/lux-jvm/source/luxc/lang/host/jvm/inst.lux index 1f9e93c71..efc4a0d0c 100644 --- a/lux-jvm/source/luxc/lang/host/jvm/inst.lux +++ b/lux-jvm/source/luxc/lang/host/jvm/inst.lux @@ -1,6 +1,6 @@ (.module: [lux (#- Type int char) - ["." host (#+ import: do_to)] + ["." ffi (#+ import: do_to)] [abstract [monad (#+ do)]] [control @@ -162,13 +162,13 @@ (-> Inst) (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitLdcInsn ( value)))))] + (org/objectweb/asm/MethodVisitor::visitLdcInsn ( value)))))] [boolean Bit function.identity] - [int Int host.long_to_int] + [int Int ffi.long_to_int] [long Int function.identity] [double Frac function.identity] - [char Nat (|>> .int host.long_to_int host.int_to_char)] + [char Nat (|>> .int ffi.long_to_int ffi.int_to_char)] [string Text function.identity] ) @@ -180,7 +180,7 @@ Inst (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitInsn (!prefix )))))] + (org/objectweb/asm/MethodVisitor::visitInsn (!prefix )))))] [ICONST_M1] [ICONST_0] [ICONST_1] [ICONST_2] [ICONST_3] [ICONST_4] [ICONST_5] [LCONST_0] [LCONST_1] @@ -192,14 +192,14 @@ Inst (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitInsn (!prefix ACONST_NULL))))) + (org/objectweb/asm/MethodVisitor::visitInsn (!prefix ACONST_NULL))))) (template [] [(def: #export ( constant) (-> Int Inst) (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitIntInsn (!prefix ) constant))))] + (org/objectweb/asm/MethodVisitor::visitIntInsn (!prefix ) constant))))] [BIPUSH] [SIPUSH] @@ -210,7 +210,7 @@ Inst (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitInsn (!prefix )))))] + (org/objectweb/asm/MethodVisitor::visitInsn (!prefix )))))] [NOP] @@ -273,7 +273,7 @@ (-> Register Inst) (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitVarInsn (!prefix ) (.int register)))))] + (org/objectweb/asm/MethodVisitor::visitVarInsn (!prefix ) (.int register)))))] [IINC] [ILOAD] [LLOAD] [FLOAD] [DLOAD] [ALOAD] @@ -285,7 +285,7 @@ (-> (Type Class) Text (Type Value) Inst) (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitFieldInsn () (..class_name class) field (..descriptor type)))))] + (org/objectweb/asm/MethodVisitor::visitFieldInsn () (..class_name class) field (..descriptor type)))))] [GETSTATIC org/objectweb/asm/Opcodes::GETSTATIC] [PUTSTATIC org/objectweb/asm/Opcodes::PUTSTATIC] @@ -300,7 +300,7 @@ (-> (Type ) Inst) (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitTypeInsn () (..class_name class)))))] + (org/objectweb/asm/MethodVisitor::visitTypeInsn () (..class_name class)))))] (~~ (template.splice +))))] @@ -317,31 +317,31 @@ (-> (Type Primitive) Inst) (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitIntInsn (org/objectweb/asm/Opcodes::NEWARRAY) - (`` (cond (~~ (template [ ] - [(type@= type) ()] - - [type.boolean org/objectweb/asm/Opcodes::T_BOOLEAN] - [type.byte org/objectweb/asm/Opcodes::T_BYTE] - [type.short org/objectweb/asm/Opcodes::T_SHORT] - [type.int org/objectweb/asm/Opcodes::T_INT] - [type.long org/objectweb/asm/Opcodes::T_LONG] - [type.float org/objectweb/asm/Opcodes::T_FLOAT] - [type.double org/objectweb/asm/Opcodes::T_DOUBLE] - [type.char org/objectweb/asm/Opcodes::T_CHAR])) - ## else - (undefined))))))) + (org/objectweb/asm/MethodVisitor::visitIntInsn (org/objectweb/asm/Opcodes::NEWARRAY) + (`` (cond (~~ (template [ ] + [(type@= type) ()] + + [type.boolean org/objectweb/asm/Opcodes::T_BOOLEAN] + [type.byte org/objectweb/asm/Opcodes::T_BYTE] + [type.short org/objectweb/asm/Opcodes::T_SHORT] + [type.int org/objectweb/asm/Opcodes::T_INT] + [type.long org/objectweb/asm/Opcodes::T_LONG] + [type.float org/objectweb/asm/Opcodes::T_FLOAT] + [type.double org/objectweb/asm/Opcodes::T_DOUBLE] + [type.char org/objectweb/asm/Opcodes::T_CHAR])) + ## else + (undefined))))))) (template [ ] [(def: #export ( class method_name method) (-> (Type Class) Text (Type Method) Inst) (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitMethodInsn () - (..class_name class) - method_name - (|> method type.descriptor descriptor.descriptor) - ))))] + (org/objectweb/asm/MethodVisitor::visitMethodInsn () + (..class_name class) + method_name + (|> method type.descriptor descriptor.descriptor) + ))))] [INVOKESTATIC org/objectweb/asm/Opcodes::INVOKESTATIC false] [INVOKEVIRTUAL org/objectweb/asm/Opcodes::INVOKEVIRTUAL false] @@ -354,7 +354,7 @@ (-> //.Label Inst) (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitJumpInsn (!prefix ) @where))))] + (org/objectweb/asm/MethodVisitor::visitJumpInsn (!prefix ) @where))))] [IF_ICMPEQ] [IF_ICMPGT] [IF_ICMPLT] [IF_ICMPNE] [IF_ICMPGE] [IF_ICMPLE] @@ -370,45 +370,45 @@ (i.< (product.left left) (product.left right))) keys+labels) array_size (list.size keys+labels) - keys_array (host.array int array_size) - labels_array (host.array org/objectweb/asm/Label array_size) + keys_array (ffi.array int array_size) + labels_array (ffi.array org/objectweb/asm/Label array_size) _ (loop [idx 0] (if (n.< array_size idx) (let [[key label] (maybe.assume (list.nth idx keys+labels))] (exec - (host.array_write idx (host.long_to_int key) keys_array) - (host.array_write idx label labels_array) + (ffi.array_write idx (ffi.long_to_int key) keys_array) + (ffi.array_write idx label labels_array) (recur (inc idx)))) []))] (do_to visitor - (org/objectweb/asm/MethodVisitor::visitLookupSwitchInsn default keys_array labels_array))))) + (org/objectweb/asm/MethodVisitor::visitLookupSwitchInsn default keys_array labels_array))))) (def: #export (TABLESWITCH min max default labels) (-> Int Int //.Label (List //.Label) Inst) (function (_ visitor) (let [num_labels (list.size labels) - labels_array (host.array org/objectweb/asm/Label num_labels) + labels_array (ffi.array org/objectweb/asm/Label num_labels) _ (loop [idx 0] (if (n.< num_labels idx) - (exec (host.array_write idx - (maybe.assume (list.nth idx labels)) - labels_array) + (exec (ffi.array_write idx + (maybe.assume (list.nth idx labels)) + labels_array) (recur (inc idx))) []))] (do_to visitor - (org/objectweb/asm/MethodVisitor::visitTableSwitchInsn min max default labels_array))))) + (org/objectweb/asm/MethodVisitor::visitTableSwitchInsn min max default labels_array))))) (def: #export (try @from @to @handler exception) (-> //.Label //.Label //.Label (Type Class) Inst) (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitTryCatchBlock @from @to @handler (..class_name exception))))) + (org/objectweb/asm/MethodVisitor::visitTryCatchBlock @from @to @handler (..class_name exception))))) (def: #export (label @label) (-> //.Label Inst) (function (_ visitor) (do_to visitor - (org/objectweb/asm/MethodVisitor::visitLabel @label)))) + (org/objectweb/asm/MethodVisitor::visitLabel @label)))) (def: #export (array elementT) (-> (Type Value) Inst) -- cgit v1.2.3