diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-03-27 19:04:28 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-03-27 19:05:00 +0100 |
commit | f8b2091aed6ca42a0cf1fa7b6a920f6c3a5227a9 (patch) | |
tree | 2add5e919615bef861178cae650266e5cab34356 /src | |
parent | 04384fa1959dabb6afc0edca586c6e624cd6a091 (diff) |
Fix refcount bug with indexing for nested arrays
Diffstat (limited to 'src')
-rw-r--r-- | src/Compile.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Compile.hs b/src/Compile.hs index 2652ed4..6e46f74 100644 --- a/src/Compile.hs +++ b/src/Compile.hs @@ -831,6 +831,7 @@ compile' env = \case resname <- genName' "ixres" emit $ SVarDecl True (repSTy t) resname (CEIndex (CELit (arrname ++ ".buf->xs")) (toLinearIdx n arrname idxname)) + incrementVarAlways "idxelt" Increment t resname incrementVarAlways "idx" Decrement (STArr n t) arrname return (CELit resname) |