From ec59936d429338dfd6deae55a7d09b2da94a781d Mon Sep 17 00:00:00 2001 From: veclav talica Date: Wed, 20 Sep 2023 12:37:49 +0500 Subject: [PATCH] forgot tolmac.zig lol --- src/tolmac.zig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/tolmac.zig diff --git a/src/tolmac.zig b/src/tolmac.zig new file mode 100644 index 0000000..b87e83f --- /dev/null +++ b/src/tolmac.zig @@ -0,0 +1,20 @@ +// todo: Interpreter context as binary local variable. +// It would hold memory mappings, as well as error stack. +// todo: Define procedure call for user code. +// todo: Instruction set extensions, such as memory management schemes, non-exhaustive logging, +// exception mechanism, coroutines via yield/resume and etc. +// todo: Threading scheme. +// todo: Extension for native floating point stack ops. +// todo: Try using small code model with nopie/nopic binary. + +// idea: Specialized opcodes that have side effects on read and write, such as +// zero-check on push/pop, or jump if condition bit met. This would create a lot +// of permutations tho, we might try to discover which code devices are most used. + +// idea: 'JIT' could be done by simple op* compiled binary copying up until `jmpq *(%%rdi)`, +// with immediate operand prelude modified, which could be done procedurally. + +pub const Word = u64; +pub const RecursionLimit = 1024; + +pub usingnamespace @import("arch/x86-64.zig");