diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-10-05 19:54:39 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-10-05 19:54:39 -0700 |
| commit | 39304d51c4a6d057e6515a9f75db2086940f6877 (patch) | |
| tree | e7ed75c42d3a0bd877303e10cce9f7f9bd5d79fd /evoke.e | |
| parent | b8798f26ee09c4b30ffe033bd657a7f4c99210e5 (diff) | |
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
Diffstat (limited to 'evoke.e')
| -rw-r--r-- | evoke.e | 90 |
1 files changed, 47 insertions, 43 deletions
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 ; |