From ebd8be68201201fd86fc4a4e4e0a535738af86bd Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Tue, 19 May 2026 00:38:46 -0700 Subject: yessssssss so okay, now all the machine code stuff is implemented and it builds without crashing the generated executable still crashes though, but this was enough work that it's getting a celebratory check-in Force-Push: yes Change-Id: I201e6912253647da58ef3537c735b478b0dca9fb --- transform.e | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'transform.e') diff --git a/transform.e b/transform.e index 7f3d9ef..0c39489 100644 --- a/transform.e +++ b/transform.e @@ -410,6 +410,24 @@ allocate-transform-state s" transform-state" variable ; make-immediate +~ TODO there should really be an actual word that this alternate is replacing +~ +~ (string pointer --) +: label-keyword-alternate + Lcreate + + here @ dup + ~ (self execution token, output point) + dup 8 + pack64 + swap :rax mov-reg64-imm64 + ~ (output point) + :rax push-reg64 + pack-next + 8 packalign + here ! + ; make-immediate + + ~ Because docol requires it, we provide a special mini-version of the label ~ system. We only do L@' and L!', because that's all we need. These are real ~ labels; there can be arbitrarily many of them, and they can have forward @@ -482,6 +500,8 @@ allocate-transform-state s" transform-state" variable dup s" ;asm" stringcmp 0 = { swap drop ' L;asm swap } if dup s" L@'" stringcmp 0 = { swap drop ' label-L@'-alternate swap } if dup s" L!'" stringcmp 0 = { swap drop ' label-L!'-alternate swap } if + dup s" keyword" stringcmp 0 = { + swap drop ' label-keyword-alternate swap } if drop swap ~ (name as stack string, 0 or alternate entry pointer, name pointer) -- cgit 1.4.1