aboutsummaryrefslogtreecommitdiff
path: root/lux-php
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-php
parent3289b9dcf9d5d1c1e5c380e3185065c8fd32535f (diff)
Some bug fixes.
Diffstat (limited to 'lux-php')
-rw-r--r--lux-php/source/program.lux24
1 files changed, 12 insertions, 12 deletions
diff --git a/lux-php/source/program.lux b/lux-php/source/program.lux
index 688626084..214960667 100644
--- a/lux-php/source/program.lux
+++ b/lux-php/source/program.lux
@@ -310,7 +310,7 @@
(let [size (|> host_object
php/runtime/memory/ArrayMemory::size
(:as Nat)
- dec)]
+ --)]
(loop [idx 0
output (:as (Array Any) (array.new size))]
(if (n.< size idx)
@@ -321,12 +321,12 @@
php/runtime/memory/ReferenceMemory::getValue)]
(case (ffi.check php/runtime/memory/NullMemory value)
(#.Some _)
- (recur (inc idx) output)
+ (recur (++ idx) output)
#.None
(case (read value)
(#try.Success lux_value)
- (recur (inc idx) (array.write! idx lux_value output))
+ (recur (++ idx) (array.write! idx lux_value output))
error
error)))
@@ -450,9 +450,9 @@
(do try.monad
[output (php/runtime/lang/Closure::call ..default_environment
(|> (ffi.array php/runtime/Memory 3)
- (ffi.array_write 0 macro)
- (ffi.array_write 1 (lux_structure (:as (Array java/lang/Object) inputs)))
- (ffi.array_write 2 (lux_structure (:as (Array java/lang/Object) lux))))
+ (ffi.write! 0 macro)
+ (ffi.write! 1 (lux_structure (:as (Array java/lang/Object) inputs)))
+ (ffi.write! 2 (lux_structure (:as (Array java/lang/Object) lux))))
(:as php/runtime/lang/Closure
(php/runtime/memory/ObjectMemory::value macro)))]
(..read (:as java/lang/Object output)))))
@@ -537,12 +537,12 @@
(|>> (:as (Array java/lang/Object)) lux_structure (:as php/runtime/Memory)))]
output (php/runtime/lang/Closure::call ..default_environment
(|> (ffi.array php/runtime/Memory 6)
- (ffi.array_write 0 handler)
- (ffi.array_write 1 (php/runtime/memory/StringMemory::new name))
- (ffi.array_write 2 (to_php phase))
- (ffi.array_write 3 (to_php archive))
- (ffi.array_write 4 (to_php parameters))
- (ffi.array_write 5 (to_php state)))
+ (ffi.write! 0 handler)
+ (ffi.write! 1 (php/runtime/memory/StringMemory::new name))
+ (ffi.write! 2 (to_php phase))
+ (ffi.write! 3 (to_php archive))
+ (ffi.write! 4 (to_php parameters))
+ (ffi.write! 5 (to_php state)))
(:as php/runtime/lang/Closure
(php/runtime/memory/ObjectMemory::value handler)))]
(..read output))))