about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-07-25 15:35:43 -0700
committerKartik Agaram <vc@akkartik.com>2020-07-25 15:35:43 -0700
commitde0e57d3ced985040cf31919a23d79fd7276f1f9 (patch)
tree0ef2e7235206d0076e03085554d93b3e2714e183
parentcd07e9b22c969ec1c501f34698e25e9ccb765593 (diff)
downloadmu-de0e57d3ced985040cf31919a23d79fd7276f1f9.tar.gz
6674
-rw-r--r--stats.txt7
-rwxr-xr-xtools/treeshake_all10
2 files changed, 9 insertions, 8 deletions
diff --git a/stats.txt b/stats.txt
index 26ddf9ea..cb0d4b78 100644
--- a/stats.txt
+++ b/stats.txt
@@ -12,7 +12,7 @@ apps/tests.subx             284      137
 apps/sigils.subx           4641      896
 apps/calls.subx            1785      448
 apps/braces.subx            360      121
-apps/mu.subx (incomplete) 18722     6044
+apps/mu.subx (incomplete) 22067     7153
 
 ## Total source lines needed including libraries
                           Initial   -whitespace/comments/tests/dead code
@@ -28,7 +28,7 @@ apps/tests.subx            8519     2214
 apps/sigils.subx          10578     3043
 apps/calls.subx            9242     2388
 apps/braces.subx           8545     2111
-apps/mu.subx (incomplete) 22481     8537
+apps/mu.subx (incomplete) 25565     9867
 
 ## executable size in KB
                           Initial   -tests/dead code
@@ -44,7 +44,7 @@ apps/tests                  41        5.8
 apps/sigils                 54        9.1
 apps/calls                  47        7.1
 apps/braces                 42        5.9
-apps/mu (incomplete)       316       49.0
+apps/mu (incomplete)       354       61.0
 
 ## history of apps/mu.subx
                                                         date    commit  mu.subx   -tests/cmts  binary (KB excl. dead code)
@@ -66,5 +66,6 @@ user-defined types, and getting fields in them          Mar 11  6135    11592
 cleanup: switch to handles everywhere                   May 22  6382    15014        5064        39
 
 first round of prototyping and static checks            Jun 21  6572    18722        6044        49
+more checks                                             Jul 25  6674    22067        7153        61
 
 vim:nowrap:tw&
diff --git a/tools/treeshake_all b/tools/treeshake_all
index bdf14c90..b05de395 100755
--- a/tools/treeshake_all
+++ b/tools/treeshake_all
@@ -13,7 +13,7 @@ export OS=${OS:-linux}
 
 process() {
   app=$1
-  tools/treeshake_translate init.$OS 0*.subx apps/subx-params.subx apps/$app.subx
+  tools/treeshake_translate init.$OS [012]*.subx apps/subx-params.subx apps/$app.subx
   echo "LoC $(cat apps/$app.subx |wc -l) => $(grep -vh '^\s*$\|^\s*#' apps/$app.subx |tools/treeshake |wc -l)"
   echo "LoC including common libraries: $(cat a.in |wc -l) => $(cat a.treeshake |wc -l)"
   echo "binary size: $(ls -lh apps/$app |column 5) => $(ls -lh a.elf |column 5)"
@@ -26,7 +26,7 @@ then
 fi
 
 echo "== deleting dead code"
-for app in factorial crenshaw2-1 crenshaw2-1b handle hex survey pack dquotes assort tests sigils calls braces
+for app in factorial crenshaw2-1 crenshaw2-1b hex survey pack dquotes assort tests sigils calls braces
 do
   echo "- $app"
   process $app
@@ -39,21 +39,21 @@ echo "== testing treeshaken binaries"
 for app in factorial crenshaw2-1 crenshaw2-1b
 do
   echo $app
-  tools/test_treeshake_translate init.$OS 0[0-8]*.subx apps/$app.subx
+  tools/test_treeshake_translate init.$OS [01]*.subx apps/$app.subx
   diff apps/$app a.elf
 done
 
 for app in hex survey pack assort dquotes tests
 do
   echo $app
-  tools/test_treeshake_translate init.$OS 0[0-8]*.subx apps/subx-params.subx apps/$app.subx
+  tools/test_treeshake_translate init.$OS [01]*.subx apps/subx-params.subx apps/$app.subx
   diff apps/$app a.elf
 done
 
 for app in sigils calls braces
 do
   echo $app
-  tools/test_treeshake_translate init.$OS 0*.subx apps/subx-params.subx apps/$app.subx
+  tools/test_treeshake_translate init.$OS [012]*.subx apps/subx-params.subx apps/$app.subx
   diff apps/$app a.elf
 done
 
p?h=main&id=6f5d7864f6c0c62b8849349cb182c61f8dbed452'>6f5d7864 ^
201b2e6c ^






6f5d7864 ^
201b2e6c ^
6f5d7864 ^
201b2e6c ^





f7051fad ^
201b2e6c ^










3ba63579 ^
201b2e6c ^








6f5d7864 ^
201b2e6c ^

6f5d7864 ^
201b2e6c ^






6f5d7864 ^
201b2e6c ^

6f5d7864 ^
201b2e6c ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119