summaryrefslogtreecommitdiffhomepage
path: root/compiler.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-05-05 11:29:20 +0200
committerJo-Philipp Wich <jo@mein.io>2021-05-05 11:31:32 +0200
commit850612f220380ecd8d53c1b7f4132ae468ead2ea (patch)
treef086a5ceea6fa968d28982be1c7b98ba2de368ae /compiler.h
parentf0a987503cb55f438a79c6d14058b23c5b801a0c (diff)
compiler: properly handle break/continue in nested scopes
When emitting byte code for break or continue statements, ensure that local variables in all containing scopes up to the loop body scope are popped, not just those in the same scope the statement is located in. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'compiler.h')
-rw-r--r--compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler.h b/compiler.h
index 3dcb79a..deec3d5 100644
--- a/compiler.h
+++ b/compiler.h
@@ -66,7 +66,7 @@ typedef enum {
struct uc_patchlist {
struct uc_patchlist *parent;
- size_t count, *entries;
+ size_t depth, count, *entries;
};
typedef struct uc_patchlist uc_patchlist;