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.e90
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 ;