summaryrefslogtreecommitdiff
path: root/prism_compile.h
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2023-11-30 16:18:14 -0500
committerJemma Issroff <jemmaissroff@gmail.com>2023-12-01 12:14:54 -0500
commitd224618beac0ed53a2f177d396f0eb6640e1a772 (patch)
treeb9c58d63005543a9f9e0d322958a9d30e248cb25 /prism_compile.h
parent5150ba0dbe98ca72f4ffb10de559b204b46eb56a (diff)
[PRISM] Restructure parameters
Prior to this commit, we weren't accounting for hidden variables on the locals table, so we would have inconsistencies on the stack. This commit fixes params, and introduces a hidden_variable_count on the scope, both of which fix parameters.
Diffstat (limited to 'prism_compile.h')
-rw-r--r--prism_compile.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/prism_compile.h b/prism_compile.h
index 2d64811e69..7f45ddd1d2 100644
--- a/prism_compile.h
+++ b/prism_compile.h
@@ -11,6 +11,14 @@ typedef struct pm_scope_node {
pm_constant_id_list_t locals;
pm_parser_t *parser;
+ // There are sometimes when we need to track
+ // hidden variables that we have put on
+ // the local table for the stack to use, so
+ // that we properly account for them when giving
+ // local indexes. We do this with the
+ // hidden_variable_count
+ int hidden_variable_count;
+
ID *constants;
st_table *index_lookup_table;