about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-01-14 00:35:44 -0800
committerKartik Agaram <vc@akkartik.com>2020-01-14 01:52:54 -0800
commit51858e5d46ed152fd61178e7014dcb02c6c7c08a (patch)
treef1598c4ea882c9660aa119a89cad10b880225718
parent730e6894671c2dbaa37fc7caaa376ccf77b0fc85 (diff)
downloadmu-51858e5d46ed152fd61178e7014dcb02c6c7c08a.tar.gz
5887 - reorganize library
Layers 0-89 are used in self-hosting SubX.
Layers 90-99 are not needed for self-hosting SubX, and therefore could
use transitional levels of syntax sugar.
Layers 100 and up use all SubX syntax sugar.
-rw-r--r--085next-word-or-string.subx (renamed from 094next-word-or-string.subx)0
-rw-r--r--090register-names.subx (renamed from 085register-names.subx)0
-rw-r--r--091write-int.subx (renamed from 092write-int.subx)0
-rw-r--r--092stack.subx (renamed from 095stack.subx)0
-rw-r--r--100array-equal.subx (renamed from 093array-equal.subx)0
-rwxr-xr-xapps/assortbin43152 -> 40055 bytes
-rwxr-xr-xapps/bracesbin43168 -> 41749 bytes
-rwxr-xr-xapps/callsbin47878 -> 46459 bytes
-rwxr-xr-xapps/crenshaw2-1bin42560 -> 39463 bytes
-rwxr-xr-xapps/crenshaw2-1bbin43107 -> 40010 bytes
-rwxr-xr-xapps/dquotesbin46802 -> 43705 bytes
-rwxr-xr-xapps/factorialbin41579 -> 38482 bytes
-rwxr-xr-xapps/handlebin42477 -> 39380 bytes
-rwxr-xr-xapps/hexbin45399 -> 42302 bytes
-rwxr-xr-xapps/mubin80072 -> 78653 bytes
-rwxr-xr-xapps/packbin55544 -> 52447 bytes
-rwxr-xr-xapps/sigilsbin55553 -> 54134 bytes
-rwxr-xr-xapps/surveybin52393 -> 49296 bytes
-rwxr-xr-xapps/testsbin41950 -> 38853 bytes
-rwxr-xr-xtest_apps21
-rwxr-xr-xtest_layers4
21 files changed, 16 insertions, 9 deletions
diff --git a/094next-word-or-string.subx b/085next-word-or-string.subx
index cb9a424c..cb9a424c 100644
--- a/094next-word-or-string.subx
+++ b/085next-word-or-string.subx
diff --git a/085register-names.subx b/090register-names.subx
index 712bbfb4..712bbfb4 100644
--- a/085register-names.subx
+++ b/090register-names.subx
diff --git a/092write-int.subx b/091write-int.subx
index 736fc684..736fc684 100644
--- a/092write-int.subx
+++ b/091write-int.subx
diff --git a/095stack.subx b/092stack.subx
index fdc4fa95..fdc4fa95 100644
--- a/095stack.subx
+++ b/092stack.subx
diff --git a/093array-equal.subx b/100array-equal.subx
index 27910620..27910620 100644
--- a/093array-equal.subx
+++ b/100array-equal.subx
diff --git a/apps/assort b/apps/assort
index c351c1d0..d01f02bd 100755
--- a/apps/assort
+++ b/apps/assort
Binary files differdiff --git a/apps/braces b/apps/braces
index 6d210604..a096d0c6 100755
--- a/apps/braces
+++ b/apps/braces
Binary files differdiff --git a/apps/calls b/apps/calls
index 023f3faf..05ba61ef 100755
--- a/apps/calls
+++ b/apps/calls
Binary files differdiff --git a/apps/crenshaw2-1 b/apps/crenshaw2-1
index 173e1f0f..239d70e0 100755
--- a/apps/crenshaw2-1
+++ b/apps/crenshaw2-1
Binary files differdiff --git a/apps/crenshaw2-1b b/apps/crenshaw2-1b
index c960d67f..259bda92 100755
--- a/apps/crenshaw2-1b
+++ b/apps/crenshaw2-1b
Binary files differdiff --git a/apps/dquotes b/apps/dquotes
index d3bc8105..db166f7a 100755
--- a/apps/dquotes
+++ b/apps/dquotes
Binary files differdiff --git a/apps/factorial b/apps/factorial
index 90f5d904..19772bad 100755
--- a/apps/factorial
+++ b/apps/factorial
Binary files differdiff --git a/apps/handle b/apps/handle
index 46571e0a..d9fc3aa9 100755
--- a/apps/handle
+++ b/apps/handle
Binary files differdiff --git a/apps/hex b/apps/hex
index 2e91f142..9c91ac4b 100755
--- a/apps/hex
+++ b/apps/hex
Binary files differdiff --git a/apps/mu b/apps/mu
index 5ed45931..1dbdf2f4 100755
--- a/apps/mu
+++ b/apps/mu
Binary files differdiff --git a/apps/pack b/apps/pack
index 18eec14c..fef9cef2 100755
--- a/apps/pack
+++ b/apps/pack
Binary files differdiff --git a/apps/sigils b/apps/sigils
index 53166e58..402e3af1 100755
--- a/apps/sigils
+++ b/apps/sigils
Binary files differdiff --git a/apps/survey b/apps/survey
index f0a911d4..386a49c7 100755
--- a/apps/survey
+++ b/apps/survey
Binary files differdiff --git a/apps/tests b/apps/tests
index fcbde7e2..729a3f9e 100755
--- a/apps/tests
+++ b/apps/tests
Binary files differdiff --git a/test_apps b/test_apps
index 7b5f0bb1..16f17138 100755
--- a/test_apps
+++ b/test_apps
@@ -170,7 +170,7 @@ test $NATIVE  &&  apps/ex12
 # Larger apps that use the standard library.
 
 echo factorial
-./bootstrap translate init.$OS 0*.subx apps/factorial.subx  -o apps/factorial
+./bootstrap translate init.$OS 0[0-8]*.subx apps/factorial.subx  -o apps/factorial
 test "$1" = 'record'  ||  git diff --exit-code apps/factorial
 test $EMULATED  &&  {
   ./bootstrap run apps/factorial  ||  ret=$?
@@ -186,7 +186,7 @@ test $NATIVE  &&  {
 }
 
 echo crenshaw2-1
-./bootstrap translate init.$OS 0*.subx apps/crenshaw2-1.subx  -o apps/crenshaw2-1
+./bootstrap translate init.$OS 0[0-8]*.subx apps/crenshaw2-1.subx  -o apps/crenshaw2-1
 test "$1" = 'record'  ||  git diff --exit-code apps/crenshaw2-1
 test $EMULATED  &&  {
   ./bootstrap run apps/crenshaw2-1 test
@@ -198,7 +198,7 @@ test $NATIVE  &&  {
 }
 
 echo crenshaw2-1b
-./bootstrap translate init.$OS 0*.subx apps/crenshaw2-1b.subx  -o apps/crenshaw2-1b
+./bootstrap translate init.$OS 0[0-8]*.subx apps/crenshaw2-1b.subx  -o apps/crenshaw2-1b
 test "$1" = 'record'  ||  git diff --exit-code apps/crenshaw2-1b
 test $EMULATED  &&  {
   ./bootstrap run apps/crenshaw2-1b test
@@ -210,7 +210,7 @@ test $NATIVE  &&  {
 }
 
 echo handle
-./bootstrap translate init.$OS 0*.subx apps/handle.subx  -o apps/handle
+./bootstrap translate init.$OS 0[0-8]*.subx apps/handle.subx  -o apps/handle
 test "$1" = 'record'  ||  git diff --exit-code apps/handle
 test $EMULATED  &&  {
   ./bootstrap run apps/handle > handle.out 2>&1  ||  true
@@ -228,7 +228,7 @@ test $NATIVE  &&  {
 for phase in hex survey pack assort dquotes tests
 do
   echo $phase
-  ./bootstrap translate init.$OS 0*.subx apps/subx-params.subx apps/$phase.subx -o apps/$phase
+  ./bootstrap translate init.$OS 0[0-8]*.subx apps/subx-params.subx apps/$phase.subx -o apps/$phase
   test "$1" = 'record'  ||  git diff --exit-code apps/hex
   test $EMULATED  &&  {
     ./bootstrap run apps/$phase test
@@ -313,13 +313,20 @@ done
 for app in factorial crenshaw2-1 crenshaw2-1b handle
 do
   echo $app
-  ./translate_subx init.$OS 0*.subx apps/$app.subx
+  ./translate_subx init.$OS 0[0-8]*.subx apps/$app.subx
   diff apps/$app a.elf
 done
 
 # Phases of the self-hosted SubX translator.
 
-for app in hex survey pack assort dquotes tests sigils calls braces
+for app in hex survey pack assort dquotes tests
+do
+  echo $app
+  ./translate_subx init.$OS 0[0-8]*.subx apps/subx-params.subx apps/$app.subx
+  diff apps/$app a.elf
+done
+
+for app in sigils calls braces
 do
   echo $app
   ./translate_subx init.$OS 0*.subx apps/subx-params.subx apps/$app.subx
diff --git a/test_layers b/test_layers
index 568a0f21..0f7c736d 100755
--- a/test_layers
+++ b/test_layers
@@ -17,8 +17,8 @@ done
 ./clean
 ./build  # build optimized since we'll be running it repeatedly below
 
-# add SubX files one at a time
-for f in [0-9]*.subx
+# add pure-SubX files (without syntax sugar) one at a time
+for f in 0[0-8]*.subx
 do
   echo "=== $f"
   ./bootstrap translate init.linux $(tools/enumerate --until $f |grep '\.subx$') -o a.elf