aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-14 01:30:08 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit664fbc5f5c947aaa04bbbf132d9c935959e34a9c (patch)
treefb25c4d6b8ccc5c6c7d02ad1170947096ff684e9 /doc
parentea97370f973374f863e4296c2bb872be8b5235a3 (diff)
Move program code generation and execution out of program (make it generic)
Diffstat (limited to 'doc')
-rw-r--r--doc/Documentation.md9
-rwxr-xr-xdoc/doc_extract.py2
2 files changed, 10 insertions, 1 deletions
diff --git a/doc/Documentation.md b/doc/Documentation.md
index 2fcfe07..602d0e1 100644
--- a/doc/Documentation.md
+++ b/doc/Documentation.md
@@ -68,4 +68,11 @@ The versions in the header only changes for every release, not every change.
|Type |Field |Description |
|-----------|-----------------|---------------------------------------------------------------------------|
|u32 |Instructions size|The size of the instructions section, in bytes. |
-|Instruction|Instructions data|The instructions data. Each instructions begins with an opcode, see #Opcode| \ No newline at end of file
+|Instruction|Instructions data|The instructions data. Each instructions begins with an opcode, see #Opcode|
+
+# Execution backend
+Amalgam supports multiple execution backend and they can be implemented with minimal
+effort. The only requirement is implementation of all the functions in executor/executor.h
+and adding the source file with the implementation to the build script. See executor/interpreter/executor.c
+as an example.\
+These functions are then called by amalgam as amalgam parses the amalgam bytecode when `amal_program_run` is called. \ No newline at end of file
diff --git a/doc/doc_extract.py b/doc/doc_extract.py
index ce192cb..1ce7dc9 100755
--- a/doc/doc_extract.py
+++ b/doc/doc_extract.py
@@ -69,9 +69,11 @@ def main():
amalgam_base = os.path.dirname(script_dir)
amalgam_includes = os.path.join(amalgam_base, "include")
amalgam_sources = os.path.join(amalgam_base, "src")
+ amalgam_executor_sources = os.path.join(amalgam_base, "executor")
source_files = get_source_files_recursive(amalgam_includes)
source_files += get_source_files_recursive(amalgam_sources)
+ source_files += get_source_files_recursive(amalgam_executor_sources)
doc_data = []
for filepath in source_files:
docs = extract_docs(filepath)