diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-05-17 21:03:44 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-05-17 21:03:44 -0700 |
| commit | 5820c29532ba877ac50b331658a4b4dd7f138ded (patch) | |
| tree | 6361b55bac70911e8c15546af770a7b57721daf9 /log-load.e | |
| parent | 3b41dbfa2338c11dd8398026c00922f20f32dc81 (diff) | |
more progress on the log-load transform
it generates most of the calls to create and comma, now Force-Push: yes Change-Id: Ib7620dca7a5bc5dd787e940ad18cf48c2a1bd529
Diffstat (limited to 'log-load.e')
| -rw-r--r-- | log-load.e | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/log-load.e b/log-load.e index 8053291..1339d7b 100644 --- a/log-load.e +++ b/log-load.e @@ -189,8 +189,9 @@ ~ log's address as a parameter rather than hardcoding it, so that it can be ~ used in situations where the normal compilation process isn't yet available. ~ -~ TODO: rework things so there's a common backend, rather than two -~ implementations +~ The requisite stack juggling is kind of finicky, sorry if it's hard to +~ read, but it's doing the same steps in the same order as the regular +~ "create". ~ ~ (log address, string pointer -- log address) : log-load-create @@ -218,3 +219,20 @@ ~ (log address, output point) over log-load-here swap drop ! ; + +~ This is the same as ",", from interpret.e, except that it takes the log's +~ address as a parameter rather than hardcoding it, so that it can be used in +~ situations where the normal compilation process isn't yet available. +~ +~ Again, the stack juggling is kind of a lot, sorry about that. +~ +~ (log address, value -- log address) +: log-load-comma + swap log-load-here swap 3unroll + ~ (log address, value, here) + @ swap pack64 + ~ (log address, updated here value) + 3roll log-load-here swap 3unroll + ~ (log address, updated here value, here) + ! ; + |