Skip to content

Commit

Permalink
6674
Browse files Browse the repository at this point in the history
  • Loading branch information
akkartik committed Jul 25, 2020
1 parent cd07e9b commit de0e57d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions stats.txt
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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&
10 changes: 5 additions & 5 deletions tools/treeshake_all
Expand Up @@ -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)"
Expand All @@ -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
Expand All @@ -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

Expand Down

0 comments on commit de0e57d

Please sign in to comment.