From 39304d51c4a6d057e6515a9f75db2086940f6877 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Mon, 5 Oct 2026 19:54:39 -0700 Subject: move to a struct-based definition of compilation inputs the migration process was a pain - order of operations for the rebuild was rough to figure out - but the actual implementation is way easier than all that stack juggling Force-Push: yes Change-Id: I8bbe4dfb39e5f0ed69f9759e87ac6ab79ec7558b --- evoke.e | 90 ++++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 47 insertions(+), 43 deletions(-) (limited to 'evoke.e') diff --git a/evoke.e b/evoke.e index 4726461..a51dfa9 100644 --- a/evoke.e +++ b/evoke.e @@ -1,40 +1,6 @@ ~ echo 's" evoke.e" enchant' | ./evoke > evoke2 && chmod 755 evoke2 ~ echo 's" evoke.e" inscribe' | ./evoke > evoke.hex -: define-inputs - here @ dup - s" language/static/core.e" packstring - s" language/static/linux.e" packstring - s" language/static/output.e" packstring - s" language/static/amd64.e" packstring - s" language/static/execution-support.e" packstring - s" language/static/log-load.e" packstring - 0 pack8 8 packalign here ! - s" static-sources" variable - - here @ dup - s" language/dynamic/dynamic.e" packstring - s" language/dynamic/input.e" packstring - s" language/dynamic/interpret.e" packstring - s" language/dynamic/flow-control.e" packstring - s" language/dynamic/linux.e" packstring - s" language/dynamic/files.e" packstring - s" language/dynamic/command-line.e" packstring - 0 pack8 8 packalign here ! - s" dynamic-sources" variable - - here @ dup - s" compilation/labels.e" packstring - s" compilation/elf.e" packstring - s" compilation/transform.e" packstring - s" compilation/execution.e" packstring - s" compilation/top-level.e" packstring - s" language/boot-source-footer.e" packstring - 0 pack8 8 packalign here ! - s" boot-sources" variable ; -define-inputs - - ~ (output memory start, current output point ~ -- output memory start, current output point) : compile-header @@ -50,6 +16,7 @@ define-inputs ~ : blank-line 0x08000000 L!' origin ; + ~ (output memory start, current output point ~ -- output memory start, current output point) : compile-footer @@ -67,15 +34,52 @@ define-inputs ; -~ (-- static source filename list, dynamic source filename list, -~ boot source filename list, compile-header word name, -~ compile-footer word name) -: evoke-executable-data - static-sources - dynamic-sources - boot-sources - s" compile-header" - s" compile-footer" ; +: define-compilation + allocate-compilation-definition + ~ (definition) + + [ current-input-file-name literal-string ] + over compilation-definition-top-level-filename ! + + here @ dup + s" language/static/core.e" packstring + s" language/static/linux.e" packstring + s" language/static/output.e" packstring + s" language/static/amd64.e" packstring + s" language/static/execution-support.e" packstring + s" language/static/log-load.e" packstring + 0 pack8 8 packalign here ! + over compilation-definition-static-filenames ! + + here @ dup + s" language/dynamic/dynamic.e" packstring + s" language/dynamic/input.e" packstring + s" language/dynamic/interpret.e" packstring + s" language/dynamic/flow-control.e" packstring + s" language/dynamic/linux.e" packstring + s" language/dynamic/files.e" packstring + s" language/dynamic/command-line.e" packstring + 0 pack8 8 packalign here ! + over compilation-definition-dynamic-filenames ! + + here @ dup + s" compilation/labels.e" packstring + s" compilation/elf.e" packstring + s" compilation/transform.e" packstring + s" compilation/execution.e" packstring + s" compilation/top-level.e" packstring + s" language/boot-source-footer.e" packstring + 0 pack8 8 packalign here ! + over compilation-definition-boot-filenames ! + + x' compile-header + over compilation-definition-compile-header ! + + x' compile-footer + over compilation-definition-compile-footer ! + + s" evoke-executable-data" variable ; +define-compilation : latest-executable-data evoke-executable-data ; -- cgit 1.4.1