From 5820c29532ba877ac50b331658a4b4dd7f138ded Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sun, 17 May 2026 21:03:44 -0700 Subject: more progress on the log-load transform it generates most of the calls to create and comma, now Force-Push: yes Change-Id: Ib7620dca7a5bc5dd787e940ad18cf48c2a1bd529 --- log-load.e | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'log-load.e') 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) + ! ; + -- cgit 1.4.1