Fri Dec 26 20:03:04 EST 2014
Essentially this is just a binary tree. How to encode?
A leaf is an execution token, which is either:
- a native code address
- the (bit) address of huffman-threaded code
- a literal word (16 bit?)
Primitives will be written in assembler. What I've seen in the past
is that there are a *lot* of local optimizations to be done here
making small space/speed tradeoffs -- i.e. where a huge execution
penalty is made for only a small gain in code efficiency and vise
versa. It would be good to be able to make those explicit.
Let's not worry too much about the primitives. Assume these are
given, then once everything works it's probably obvious how to analyze
To be able to do bit-addressing, 3 bits need to be reserved for
addressing within a byte, leaving 13 bits or 8K bytes. Using 24 bit
words gives 2^21 = 2M bytes.
So this makes sense for uCs up to 16k of flash, leaving half of the
memory for threaded code and the other half for primitives and