diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-09-29 11:17:30 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-09-29 11:18:56 -0700 |
| commit | 3c36f513532d28ac101fb057e845ce66b8e6da1b (patch) | |
| tree | 7c7d7bab19990e95bdb0893040b90154dc5e8483 /compilation/transform.e | |
| parent | 77e8ce989010fbd94080e780fb0b5cb6c10434e8 (diff) | |
add a constant string "boot-source" which is run at startup
this will allow us to have compiled-in code that wouldn't run under the transforms, though we don't add anything of substance just yet this strategy was used early in bring-up, in the historical flatassembler version of Evocation, so the design space of it is already well-explored in Irenes' head. how pleasant. :) Force-Push: yes Change-Id: I722cddb77657df9ca518c0d9841aa587bf63feb3
Diffstat (limited to 'compilation/transform.e')
| -rw-r--r-- | compilation/transform.e | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compilation/transform.e b/compilation/transform.e index 80ef98b..5b84009 100644 --- a/compilation/transform.e +++ b/compilation/transform.e @@ -1447,7 +1447,7 @@ allocate-transformation-state s" transformation-state" variable ~ more complex. ~ ~ (output buffer start, output point, input string pointer -~ -- output buffer start, output point) +~ -- output buffer start, output point, final entry pointer) : label-transform ~ : blank-line ~ : blank-line @@ -1499,12 +1499,13 @@ allocate-transformation-state s" transformation-state" variable ~ When the loop is done, get the real values of "here" and "latest" ~ back. The internal "here" is also the output point, and will become our - ~ return value. The internal "latest" is discarded. + ~ return value. The internal "latest" is returned as a result. { transformation-state transformation-state-output-buffer-start @ here @ + latest @ 3unroll transformation-state transformation-state-saved-here @ here ! transformation-state transformation-state-saved-latest @ latest ! - ~ (output buffer start, output point) + ~ (final entry pointer, output buffer start, output point) ~ Though we don't actually use transformation-state outside of this ~ invocation, for tidiness we zero it out. @@ -1515,6 +1516,9 @@ allocate-transformation-state s" transformation-state" variable ~ Also put the input source back how it was. main-input-buffer pop-input-buffer + 3roll 2 pick - + ~ (output buffer start, output point, final entry offset) + exit } if } forever ; |