about summary refs log tree commit diff
path: root/evoke.e
diff options
context:
space:
mode:
Diffstat (limited to 'evoke.e')
-rw-r--r--evoke.e92
1 files changed, 42 insertions, 50 deletions
diff --git a/evoke.e b/evoke.e
index 64a4d92..40f996e 100644
--- a/evoke.e
+++ b/evoke.e
@@ -1,49 +1,42 @@
-~ cat evoke.e | ./evoke > evoke2 && chmod 755 evoke2
+~ echo 's" evoke.e" enchant' | ./evoke > evoke2 && chmod 755 evoke2
+~ echo 's" evoke.e" inscribe' | ./evoke > evoke.hex
 
-: read-inputs
+: define-inputs
   here @ dup
-  s" language/static/core.e" pack-file-contents
-  s" language/static/linux.e" pack-file-contents
-  s" language/static/output.e" pack-file-contents
-  s" language/static/amd64.e" pack-file-contents
-  s" language/static/execution-support.e" pack-file-contents
-  s" language/static/log-load.e" pack-file-contents
+  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" source-to-precompile" variable
+  s" static-sources" variable
 
   here @ dup
-  s" language/static/core.e" pack-file-contents
-  s" language/static/linux.e" pack-file-contents
-  s" language/static/output.e" pack-file-contents
-  s" language/static/amd64.e" pack-file-contents
-  s" language/static/execution-support.e" pack-file-contents
-  s" language/static/log-load.e" pack-file-contents
-  s" language/dynamic/dynamic.e" pack-file-contents
-  s" language/dynamic/input.e" pack-file-contents
-  s" language/dynamic/interpret.e" pack-file-contents
-  s" language/dynamic/flow-control.e" pack-file-contents
-  s" language/dynamic/linux.e" pack-file-contents
-  s" language/dynamic/files.e" pack-file-contents
+  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
   0 pack8 8 packalign here !
-  s" source-to-copy-to-log" variable
+  s" dynamic-sources" variable
 
   here @ dup
-  s" compilation/labels.e" pack-file-contents
-  s" compilation/elf.e" pack-file-contents
-  s" compilation/transform.e" pack-file-contents
-  s" compilation/execution.e" pack-file-contents
-  s" language/boot-source-footer.e" pack-file-contents
+  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" source-to-textually-include" variable ;
-read-inputs
+  s" boot-sources" variable ;
+define-inputs
 
 
 ~ (output memory start, current output point
 ~  -- output memory start, current output point)
-~
-~ Everything directly called by all-contents has this same interface.
-~
-: all-contents
+: compile-header
   ~ :   This particular program is 'evoke', the compiler. If you already have
   ~ : a binary copy of 'hex', run this file through it and you'll have a
   ~ : working compiler. Pretty sweet, right?
@@ -54,22 +47,11 @@ read-inputs
   ~ : readability but isn't easily reproduced in this form, though every
   ~ : effort has been made.
   ~ : blank-line
-  0x08000000 L!' origin
-
-  elf-file-header
-  elf-program-header
-
-  output-cold-start
-
-  output-warm-start-header
-  source-to-copy-to-log log-load-transform
-  output-warm-start-post-log-load-transform
-  output-warm-start-attach-boot-source
-  output-warm-start-footer
-
-  source-to-precompile label-transform
-  source-to-textually-include output-boot-source
+  0x08000000 L!' origin ;
 
+~ (output memory start, current output point
+~  -- output memory start, current output point)
+: compile-footer
   ~   If we wanted words in the log to be able to call statically-linked
   ~ words, we could set this to something nonzero. We don't, so we leave it
   ~ alone.
@@ -83,6 +65,16 @@ read-inputs
   ~ : This is the end of the hex dump. Thanks for reading!
   ;
 
-' all-contents entry-to-execution-token label-loop
-1 3unroll sys-write bye
+
+~ (-- 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" ;
+
+: latest-executable-data evoke-executable-data ;