diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-07-20 23:59:23 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-07-20 23:59:23 -0700 |
commit | 90538f232a31c621323ba1b8b93fad57c555b810 (patch) | |
tree | 1547e1f77457cc7d2aa83cc2f3468a377901489d /subx | |
parent | 4fe73d475778af04ddcc4568b64a2c8035bca028 (diff) | |
download | mu-90538f232a31c621323ba1b8b93fad57c555b810.tar.gz |
5431 - starting to translate std lib
Currently failing at layer 54: ``` $ time ./translate 049memory_layout.subx 05[0-4]*.subx; ./subx run a.elf test leaky-get-or-insert-slice: too many segments ``` Emulation is also damn slow. But running in native mode is fast.
Diffstat (limited to 'subx')
-rwxr-xr-x | subx/ntranslate | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/subx/ntranslate b/subx/ntranslate new file mode 100755 index 00000000..0cde1721 --- /dev/null +++ b/subx/ntranslate @@ -0,0 +1,33 @@ +#!/bin/sh +# Translate SubX using the self-hosted translator. +# +# Possible knobs: +# Whether to run a phase directly or emulated. +# This script is for running natively. +# Whether to stop after a phase. +# Just always run all phases, but print out phases so it's clear where an error happens. +# Whether to trace a phase. Whether to always trace or rerun with tracing enabled after an error. +# Leave tracing to other scripts. We save intermediate files so it's easy to rerun a single phase afterwards. +# Whether to run a phase with debug information. (Need to juggle multiple sets of debug files.) +# Again, that's for subsequent scripts. + +set -e +set -v + +build + +echo `cat $* |grep -v '^\s*#\|^\s*$' |wc -l` lines + +cat $* |apps/tests > a.tests + +cat a.tests |apps/dquotes > a.dquotes + +cat a.dquotes |apps/assort > a.assort + +cat a.assort |apps/pack > a.pack + +cat a.pack |apps/survey > a.survey + +cat a.survey |apps/hex > a.elf + +xxd a.elf > a.xxd |