aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/expr.zc
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/expr.zc')
-rw-r--r--src/compiler/expr.zc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/expr.zc b/src/compiler/expr.zc
index 40de6ef..f41109e 100644
--- a/src/compiler/expr.zc
+++ b/src/compiler/expr.zc
@@ -647,7 +647,7 @@ word closure_layout(int closure_index, int count) {
// variable in. ctx_push / ctx_pop save and restore the enclosing function's
// compiler state around the body.
int closure() {
- int np = 0; char*[20] pn; word[20] pty; int hop, entry, i, t, envl, ncap, c, result, declared = 0, tags = 0, tag; word[20] ptags;
+ int np = 0; char*[20] pn; word[20] pty; int hop, entry, i, t, envl, ncap, c, result, declared = 0, tags = 0, tag, lt, lfl = tline; word[20] ptags;
word expected = closure_expected; closure_expected = 0;
reserve_closures(nclo + 1);
if (o3on) serr("closures can't be made inside an o3 region");
@@ -679,6 +679,7 @@ int closure() {
hop = hole(); op(O_JMP);
entry = here;
fn_begin(1, 0);
+ lt = lt_begin(entry, "<closure>", lfl);
if (declared) fty = declared;
prologue(); borrow_prologue();
i = 0;
@@ -699,6 +700,7 @@ int closure() {
if (result <= 0 || live) result = tword;
if (declared) result = declared;
epilogue();
+ lt_end(lt, here);
nclo--;
c = nclo;
ncap = clo_n[c];