aboutsummaryrefslogtreecommitdiff
path: root/include/bytecode
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-07-17 19:23:16 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit84e65c63e7482590d535e86f7660a00ae8a0cecb (patch)
treec79de87b7136e96b977003db85d43e5e676bbfc1 /include/bytecode
parent85c654a102701958d3748e82ecac9c1bc4dbbcba (diff)
Start on amal program
Fix mutex issue in lhs expr which can cause a deadlock when a file has an error and throws and doesn't close the mutex and another thread waits for that mutex. The mutex can instead be removed and ignore race conditions which are uncommon. This should improve memory usage and performance.
Diffstat (limited to 'include/bytecode')
-rw-r--r--include/bytecode/bytecode.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/bytecode/bytecode.h b/include/bytecode/bytecode.h
index 600c9f2..739aa79 100644
--- a/include/bytecode/bytecode.h
+++ b/include/bytecode/bytecode.h
@@ -9,7 +9,6 @@
#include <setjmp.h>
/*doc(Opcode)
- # Opcode
Variable length opcodes. Sizes range from 1 to 4 bytes.
# Instruction formats
Instructions can be in 6 different formats:
@@ -50,12 +49,12 @@ typedef enum {
typedef u8 AmalOpcodeType;
typedef struct {
- Buffer/*<instruction data>*/ instructions;
+ Buffer/*<headers + instruction data>*/ data;
} Bytecode;
typedef struct {
jmp_buf env;
- Bytecode *bytecode;
+ Bytecode bytecode;
Parser *parser; /* borrowed */
} BytecodeCompilerContext;