aboutsummaryrefslogtreecommitdiff
path: root/lux-php
diff options
context:
space:
mode:
authorEduardo Julian2021-03-18 16:27:04 -0400
committerEduardo Julian2021-03-18 16:27:04 -0400
commit3f23fb8c846acfd7cf04481f12839469c63a1148 (patch)
tree397e585e7eafd2f5e39d3643a5289facce5c69ad /lux-php
parent20383a3f634aef56413c5451bbf31be5eea2932a (diff)
Updates for Scheme compiler.
Diffstat (limited to 'lux-php')
-rw-r--r--lux-php/commands.md37
-rw-r--r--lux-php/source/program.lux2
2 files changed, 38 insertions, 1 deletions
diff --git a/lux-php/commands.md b/lux-php/commands.md
new file mode 100644
index 000000000..618c13c52
--- /dev/null
+++ b/lux-php/commands.md
@@ -0,0 +1,37 @@
+# PHP compiler
+
+## Test
+
+```
+cd ~/lux/lux-php/ && lein lux auto test
+cd ~/lux/lux-php/ && lein clean && lein lux auto test
+```
+
+## Build
+
+```
+## Develop
+## NOTE: Must set lux/control/concurrency/thread.parallelism = 1 before compiling to make sure JPHP doesn't cause trouble.
+cd ~/lux/lux-php/ \
+&& lein clean \
+&& lein lux auto build
+
+## Build JVM-based compiler
+## NOTE: Must set lux/control/concurrency/thread.parallelism = 1 before compiling to make sure JPHP doesn't cause trouble.
+cd ~/lux/lux-php/ \
+&& lein clean \
+&& lein lux build \
+&& mv target/program.jar jvm_based_compiler.jar
+```
+
+## Try
+
+```
+## Compile Lux's Standard Library's tests using a JVM-based compiler.
+cd ~/lux/stdlib/ \
+&& lein clean \
+&& time java -jar ~/lux/lux-php/target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux
+
+php -f ~/lux/stdlib/target/program.php
+```
+
diff --git a/lux-php/source/program.lux b/lux-php/source/program.lux
index a13039760..716405587 100644
--- a/lux-php/source/program.lux
+++ b/lux-php/source/program.lux
@@ -483,7 +483,7 @@
(let [global (reference.artifact context)
@global (_.global global)]
(do try.monad
- [#let [definition (_.; (_.set @global input))]
+ [#let [definition (_.set! @global input)]
_ (run! definition)
value (run! (_.return @global))]
(wrap [global value definition]))))