diff options
author | Eduardo Julian | 2021-03-10 10:32:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-03-10 10:32:30 -0400 |
commit | 0c75fd67e3fcfbfb09d8c11b6cf396084ce40a15 (patch) | |
tree | aa95b07ad0a18e0b1dd92657330c7ccaa6202245 /compilers.md | |
parent | cbc41f10fb3e0e776767d2266b22068172b0f69a (diff) |
Wrestling with JPHP.
Diffstat (limited to '')
-rw-r--r-- | compilers.md | 245 |
1 files changed, 1 insertions, 244 deletions
diff --git a/compilers.md b/compilers.md index 3e70d6137..d757f123b 100644 --- a/compilers.md +++ b/compilers.md @@ -1,240 +1,3 @@ -# Clean all - -``` -cd ~/lux/lux-jvm/ && lein clean && \ -cd ~/lux/lux-js/ && lein clean && \ -cd ~/lux/lux-python/ && lein clean && \ -cd ~/lux/lux-lua/ && lein clean && \ -cd ~/lux/lux-ruby/ && lein clean && \ -cd ~/lux/lux-php/ && lein clean && \ -cd ~/lux/lux-cl/ && lein clean && \ -cd ~/lux/lux-scheme/ && lein clean && \ -cd ~/lux/lux-r/ && lein clean -``` - ---- - -# JVM compiler - -## Test - -``` -cd ~/lux/lux-jvm/ && lein lux auto test -cd ~/lux/lux-jvm/ && lein clean && lein lux auto test -``` - -## Build - -``` -cd ~/lux/lux-jvm/ && lein lux auto build - -## Use bootstrapping compiler to build new JVM compiler -cd ~/lux/lux-jvm/ \ -&& lein clean \ -&& lein lux auto build -``` - -## REPL - -``` -cd ~/lux/lux-jvm/ && java -jar target/program.jar repl --source ~/lux/stdlib/source --target ~/lux/stdlib/target -``` - -## Try - -``` -cd ~/lux/lux-jvm/ && time java -jar target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux -cd ~/lux/lux-jvm/ && java -jar target/program.jar export --source ~/lux/stdlib/source --target ~/lux/stdlib/target - -cd ~/lux/stdlib/ \ -&& cd ~/lux/lux-jvm/ \ -&& time java -jar target/program.jar build --source ~/lux/stdlib/source --library ~/lux/stdlib/target/library.tar --target ~/lux/stdlib/target --module test/lux - -## Use new JVM compiler to compile tests for the Standard Library -cd ~/lux/stdlib/ \ -&& lein clean \ -&& time java -jar ~/lux/lux-jvm/target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux - -## Run tests for the Standard Library -cd ~/lux/stdlib/target/ \ -&& java -jar program.jar -``` - -## Deploy - -``` -cd ~/lux/lux-jvm/ && mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-jvm -Dversion=0.6.0-SNAPSHOT -Dpackaging=jar - -cd ~/lux/lux-jvm/ && mvn deploy:deploy-file \ --Durl=https://<username>:<password>@oss.sonatype.org/content/repositories/snapshots/ \ --Dfile=target/program.jar \ --DgroupId=com.github.luxlang \ --DartifactId=lux-jvm \ --Dversion=0.6.0-SNAPSHOT \ --Dpackaging=jar -``` - ---- - -# JavaScript compiler - -## Test - -``` -cd ~/lux/lux-js/ && lein lux auto test -cd ~/lux/lux-js/ && lein clean && lein lux auto test -``` - -## Build - -``` -cd ~/lux/lux-js/ && lein lux auto build -cd ~/lux/lux-js/ && lein clean && lein lux auto build - -## Build JVM-based compiler -cd ~/lux/lux-js/ \ -&& lein clean \ -&& lein lux build \ -&& mv target/program.jar jvm_based_compiler.jar - -## Use JVM-based compiler to produce a JS/Node-based compiler. -cd ~/lux/lux-js/ \ -&& lein clean \ -&& time java -jar jvm_based_compiler.jar build --source ~/lux/lux-js/source --target ~/lux/lux-js/target --module program \ -&& mv target/program.js node_based_compiler.js - -## Use JS/Node-based compiler to produce another JS/Node-based compiler. -cd ~/lux/lux-js/ \ -&& lein clean \ -&& time node --stack_size=8192 node_based_compiler.js build --source ~/lux/lux-js/source --target ~/lux/lux-js/target --module program \ -&& mv target/program.js lux.js -``` - -## Try - -``` -## Compile Lux's Standard Library's tests using a JS/Node-based compiler. -cd ~/lux/stdlib/ \ -&& lein clean \ -&& time node --stack_size=8192 ~/lux/lux-js/lux.js build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux - -node ~/lux/stdlib/target/program.js -``` - ---- - -# Python compiler - -## Test - -``` -cd ~/lux/lux-python/ && lein lux auto test -cd ~/lux/lux-python/ && lein clean && lein lux auto test -``` - -## Build - -``` -## Develop -cd ~/lux/lux-python/ \ -&& lein clean \ -&& lein lux auto build - -## Build JVM-based compiler -cd ~/lux/lux-python/ \ -&& 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-python/jvm_based_compiler.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux - -python3 ~/lux/stdlib/target/program.py -``` - ---- - -# Lua compiler - -## Test - -``` -cd ~/lux/lux-lua/ && lein lux auto test -cd ~/lux/lux-lua/ && lein clean && lein lux auto test -``` - -## Build - -``` -## Develop -cd ~/lux/lux-lua/ \ -&& lein clean \ -&& lein lux auto build - -## Build JVM-based compiler -## NOTE: Must set lux/control/concurrency/thread.parallelism = 1 before compiling to make sure Rembulan doesn't cause trouble. -cd ~/lux/lux-lua/ \ -&& 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-lua/jvm_based_compiler.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux - -~/lua-5.4.2/install/bin/lua ~/lux/stdlib/target/program.lua -``` - ---- - -# Ruby compiler - -## Test - -``` -cd ~/lux/lux-ruby/ && lein lux auto test -cd ~/lux/lux-ruby/ && lein clean && lein lux auto test -``` - -## Build - -``` -## Develop -cd ~/lux/lux-ruby/ \ -&& lein clean \ -&& lein lux auto build - -## Build JVM-based compiler -cd ~/lux/lux-ruby/ \ -&& 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-ruby/target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux - -RUBY_THREAD_VM_STACK_SIZE=15700000 ruby ~/lux/stdlib/target/program.rb -``` - ---- - # PHP compiler ## Test @@ -251,12 +14,6 @@ cd ~/lux/lux-php/ && lein clean && lein lux auto test cd ~/lux/lux-php/ \ && lein clean \ && lein lux auto build - -## Build JVM-based compiler -cd ~/lux/lux-php/ \ -&& lein clean \ -&& lein lux build \ -&& mv target/program.jar jvm_based_compiler.jar ``` ## Try @@ -265,7 +22,7 @@ cd ~/lux/lux-php/ \ ## Compile Lux's Standard Library's tests using a JVM-based compiler. cd ~/lux/stdlib/ \ && lein clean \ -&& time java -jar ~/lux/lux-php/jvm_based_compiler.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux +&& time java -jar ~/lux/lux-php/target/program.jar build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux ``` --- |