diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-05-29 16:04:30 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-05-29 16:04:30 -0700 |
commit | 0bba6ccfc25d77d5148a2a24f0185aefa1481994 (patch) | |
tree | ad88c4571746c143308418dc296374c562be89e5 /shell | |
parent | aceb526b50d98731d85eb589f1819237ee96fcf8 (diff) | |
download | mu-0bba6ccfc25d77d5148a2a24f0185aefa1481994.tar.gz |
.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/tokenize.mu | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/shell/tokenize.mu b/shell/tokenize.mu index 2ce8be6d..214c0d9b 100644 --- a/shell/tokenize.mu +++ b/shell/tokenize.mu @@ -13,11 +13,6 @@ fn tokenize in: (addr gap-buffer), out: (addr stream cell), trace: (addr trace) var done?/eax: boolean <- gap-buffer-scan-done? in compare done?, 0/false break-if-!= - # initialize token data each iteration to avoid aliasing - var dest-ah/eax: (addr handle stream byte) <- get token, text-data - # TODO: obscenely pessimally sized - # I'm allocating 1KB for every. single. token. Just because a whole definition needs to fit in a string sometimes. Absolutely bonkers. - populate-stream dest-ah, 0x400/max-definition-size # next-token in, token, trace var skip?/eax: boolean <- comment-token? token @@ -240,7 +235,10 @@ fn next-token in: (addr gap-buffer), _out-cell: (addr cell), trace: (addr trace) var out-cell-type/eax: (addr int) <- get out-cell, type copy-to *out-cell-type, 0/uninitialized } - var out-ah/eax: (addr handle stream byte) <- get out-cell, text-data + var out-ah/edi: (addr handle stream byte) <- get out-cell, text-data + # TODO: obscenely pessimally sized + # I'm allocating 1KB for every. single. token. Just because a whole definition needs to fit in a string sometimes. Absolutely bonkers. + populate-stream out-ah, 0x400/max-definition-size var _out/eax: (addr stream byte) <- lookup *out-ah var out/edi: (addr stream byte) <- copy _out clear-stream out |