aboutsummaryrefslogtreecommitdiffstats
path: root/awk.h
diff options
context:
space:
mode:
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/awk.h b/awk.h
index c1e9b4a9..6b7cdb7a 100644
--- a/awk.h
+++ b/awk.h
@@ -783,6 +783,7 @@ typedef struct exp_instruction {
} x;
short source_line;
+ short pool_size; // memory management in symbol.c
OPCODE opcode;
} INSTRUCTION;
@@ -1031,9 +1032,15 @@ typedef struct srcfile {
int lasttok;
} SRCFILE;
+// structure for INSTRUCTION pool, needed mainly for debugger
+typedef struct instruction_pool {
+#define MAX_INSTRUCTION_ALLOC 3 // we don't call bcalloc with more than this
+ INSTRUCTION pool[MAX_INSTRUCTION_ALLOC + 1];
+} INSTRUCTION_POOL;
+
/* structure for execution context */
typedef struct context {
- INSTRUCTION pools;
+ INSTRUCTION_POOL pools;
NODE symbols;
INSTRUCTION rule_list;
SRCFILE srcfiles;