aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source/luxc/lang/host/jvm
diff options
context:
space:
mode:
authorEduardo Julian2021-08-18 03:29:15 -0400
committerEduardo Julian2021-08-18 03:29:15 -0400
commite00ba096c8837abe85d366e0c1293c09dbe84d81 (patch)
treedc1f0955d4461ae30bb4945cddd74c462f1aee98 /lux-jvm/source/luxc/lang/host/jvm
parent3289b9dcf9d5d1c1e5c380e3185065c8fd32535f (diff)
Some bug fixes.
Diffstat (limited to 'lux-jvm/source/luxc/lang/host/jvm')
-rw-r--r--lux-jvm/source/luxc/lang/host/jvm/def.lux20
-rw-r--r--lux-jvm/source/luxc/lang/host/jvm/inst.lux14
2 files changed, 17 insertions, 17 deletions
diff --git a/lux-jvm/source/luxc/lang/host/jvm/def.lux b/lux-jvm/source/luxc/lang/host/jvm/def.lux
index f8233222d..130e0bb56 100644
--- a/lux-jvm/source/luxc/lang/host/jvm/def.lux
+++ b/lux-jvm/source/luxc/lang/host/jvm/def.lux
@@ -83,7 +83,7 @@
(-> (List Text) (Array Text))
(let [output (ffi.array java/lang/String (list.size values))]
(exec (list@map (function (_ [idx value])
- (ffi.array_write idx value output))
+ (ffi.write! idx value output))
(list.enumeration values))
output)))
@@ -110,23 +110,23 @@
(def: (class_flags config)
(-> //.Class_Config Int)
($_ i.+
- (if (get@ #//.finalC config) (org/objectweb/asm/Opcodes::ACC_FINAL) +0)))
+ (if (value@ #//.finalC config) (org/objectweb/asm/Opcodes::ACC_FINAL) +0)))
(def: (method_flags config)
(-> //.Method_Config Int)
($_ i.+
- (if (get@ #//.staticM config) (org/objectweb/asm/Opcodes::ACC_STATIC) +0)
- (if (get@ #//.finalM config) (org/objectweb/asm/Opcodes::ACC_FINAL) +0)
- (if (get@ #//.synchronizedM config) (org/objectweb/asm/Opcodes::ACC_SYNCHRONIZED) +0)
- (if (get@ #//.strictM config) (org/objectweb/asm/Opcodes::ACC_STRICT) +0)))
+ (if (value@ #//.staticM config) (org/objectweb/asm/Opcodes::ACC_STATIC) +0)
+ (if (value@ #//.finalM config) (org/objectweb/asm/Opcodes::ACC_FINAL) +0)
+ (if (value@ #//.synchronizedM config) (org/objectweb/asm/Opcodes::ACC_SYNCHRONIZED) +0)
+ (if (value@ #//.strictM config) (org/objectweb/asm/Opcodes::ACC_STRICT) +0)))
(def: (field_flags config)
(-> //.Field_Config Int)
($_ i.+
- (if (get@ #//.staticF config) (org/objectweb/asm/Opcodes::ACC_STATIC) +0)
- (if (get@ #//.finalF config) (org/objectweb/asm/Opcodes::ACC_FINAL) +0)
- (if (get@ #//.transientF config) (org/objectweb/asm/Opcodes::ACC_TRANSIENT) +0)
- (if (get@ #//.volatileF config) (org/objectweb/asm/Opcodes::ACC_VOLATILE) +0)))
+ (if (value@ #//.staticF config) (org/objectweb/asm/Opcodes::ACC_STATIC) +0)
+ (if (value@ #//.finalF config) (org/objectweb/asm/Opcodes::ACC_FINAL) +0)
+ (if (value@ #//.transientF config) (org/objectweb/asm/Opcodes::ACC_TRANSIENT) +0)
+ (if (value@ #//.volatileF config) (org/objectweb/asm/Opcodes::ACC_VOLATILE) +0)))
(def: param_signature
(-> (Type Class) Text)
diff --git a/lux-jvm/source/luxc/lang/host/jvm/inst.lux b/lux-jvm/source/luxc/lang/host/jvm/inst.lux
index 0c724ca87..e0402d924 100644
--- a/lux-jvm/source/luxc/lang/host/jvm/inst.lux
+++ b/lux-jvm/source/luxc/lang/host/jvm/inst.lux
@@ -377,9 +377,9 @@
(if (n.< array_size idx)
(let [[key label] (maybe.trusted (list.item idx keys+labels))]
(exec
- (ffi.array_write idx (ffi.long_to_int key) keys_array)
- (ffi.array_write idx label labels_array)
- (recur (inc idx))))
+ (ffi.write! idx (ffi.long_to_int key) keys_array)
+ (ffi.write! idx label labels_array)
+ (recur (++ idx))))
[]))]
(do_to visitor
(org/objectweb/asm/MethodVisitor::visitLookupSwitchInsn default keys_array labels_array)))))
@@ -391,10 +391,10 @@
labels_array (ffi.array org/objectweb/asm/Label num_labels)
_ (loop [idx 0]
(if (n.< num_labels idx)
- (exec (ffi.array_write idx
- (maybe.trusted (list.item idx labels))
- labels_array)
- (recur (inc idx)))
+ (exec (ffi.write! idx
+ (maybe.trusted (list.item idx labels))
+ labels_array)
+ (recur (++ idx)))
[]))]
(do_to visitor
(org/objectweb/asm/MethodVisitor::visitTableSwitchInsn min max default labels_array)))))