summaryrefslogtreecommitdiff
path: root/include/lang.h
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2023-01-28 20:08:43 +0000
committerStefan Eßer <se@FreeBSD.org>2023-01-28 20:08:43 +0000
commit1a63323d17fedb05b6962853e821c9d7c6b9853e (patch)
tree97f1d2e585fa485b0dcea42f46de98bdb6c09327 /include/lang.h
parent3c2ba19f6b2f58c7cb3389e595d6afe7310c0d6b (diff)
Diffstat (limited to 'include/lang.h')
-rw-r--r--include/lang.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/lang.h b/include/lang.h
index 4ad6df88f5ed..2d9776532249 100644
--- a/include/lang.h
+++ b/include/lang.h
@@ -352,6 +352,12 @@ typedef struct BcLoc
/// The index of the var or array.
size_t loc;
+ /// The index of the array or variable in the array stack. This is to
+ /// prevent a bug with getting the wrong array element or variable after a
+ /// function call. See the tests/bc/scripts/array.bc test for the array
+ /// case; the variable case is in various variable tests.
+ size_t stack_idx;
+
/// The index of the array element. Only used for array elements.
size_t idx;