From 2d9bed2e8e1b8fc3a08c3209d9528b52e3251812 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Tue, 6 Oct 2026 17:43:31 -0700 Subject: rework the interface to "enchant" to support different kinds of executables so, in particular, "hex" now builds with the new syntax to implement this, "enchant" now passes the full structure through to "output-contents", which makes it easier to extend. additionally, when inscribing, the source of "evoke" needs to be included in the scope of the hex transform even when the program being compiled is something else, so that it can carefully interfere with the other transforms. this is now implemented, though in an inelegant way that could do with some cleanup. (that last sentence could be the slogan of the whole project :D) Change-Id: I553afadba350a62d6e97a21df2b3e821685b9c0c Force-Push: yes --- hello.e | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'hello.e') diff --git a/hello.e b/hello.e index a19d076..593dc95 100644 --- a/hello.e +++ b/hello.e @@ -1,4 +1,6 @@ -~ cat labels.e elf.e hello.e | ./quine > hello && chmod 755 hello && ./hello +~ ./evoke hello.e enchant > hello && chmod 755 hello && ./hello + +s" evoke.e" include drop : output-start-routine current-offset L!' cold-start @@ -31,6 +33,21 @@ current-offset L!' total-size ; -x' all-contents label-loop -1 3unroll sys-write bye + +: define-compilation + allocate-compilation-definition + dup zero-compilation-definition + ~ (definition) + + :raw-executable over compilation-definition-executable-type ! + + [ current-input-file-name literal-string ] + over compilation-definition-top-level-filename ! + + x' all-contents over compilation-definition-compile-body ! + + s" hello-executable-data" variable ; +define-compilation + +: latest-executable-data hello-executable-data ; -- cgit 1.4.1