about summary refs log tree commit diff stats
path: root/translate_subx_baremetal
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-01-15 21:11:43 -0800
committerKartik Agaram <vc@akkartik.com>2021-01-15 21:22:33 -0800
commit49424b1933051b6cf1ce3371ada9cd7fa2d31df0 (patch)
tree3a30ae973fca31024aec4a48a29b75d5f66400fa /translate_subx_baremetal
parent8ed27ce4319eb843ee021ca0b1cb46d275c2f89d (diff)
downloadmu-49424b1933051b6cf1ce3371ada9cd7fa2d31df0.tar.gz
7523
There's a dependency cycle here:

- draw-grapheme (Mu) uses read-grapheme (Mu) to be unicode-aware.
- read-grapheme uses read-byte (SubX). Streams are a fundamental data
  structure in Mu. For the Mu compiler to be able to reason about the
  safety of stream operations, they need to be an opaque type. All
  stream primitives are written in SubX. To manipulate a stream's
  internals we force people to reach for SubX. That way if there's no
  SubX code there's confidence that things are safe.
- read-byte and other stream operations have unit tests, like they
  should. The unit tests need to print data to screen when say a test
  fails. To do this they use various check- functions (SubX) that take a
  string argument.
- Printing a string to screen uses draw-grapheme (Mu).

Perhaps I should maintain variants of drawing primitives that operate
only on ASCII.
Diffstat (limited to 'translate_subx_baremetal')
-rwxr-xr-xtranslate_subx_baremetal3
1 files changed, 3 insertions, 0 deletions
diff --git a/translate_subx_baremetal b/translate_subx_baremetal
index 7058003c..29750abb 100755
--- a/translate_subx_baremetal
+++ b/translate_subx_baremetal
@@ -7,6 +7,9 @@
 #   version of translate_subx_debug for baremetal.
 # * Don't pass in numbered .subx files without translated .mu files. Our test
 #   harness is in test.mu, and only Mu programs can run tests in baremetal.
+#
+# The baremetal directory is in general not as rigorous about avoiding
+# dependency cycles as the top-level.
 
 set -e