From 4a265e29565718684ce30a7e90263da0ba71a0c1 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 5 May 2017 14:40:14 +1000 Subject: src/lfunc: Move refcount initialisation into constructor --- src/lfunc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lfunc.js b/src/lfunc.js index e038cc0..544b87c 100644 --- a/src/lfunc.js +++ b/src/lfunc.js @@ -29,6 +29,7 @@ class UpVal { constructor(L) { this.L = L; // Keep track of the thread it comes from this.v = null; /* if null, upval is closed, value is in u.value */ + this.refcount = 0; this.u = { open: { /* (when open) */ next: null, /* linked list */ @@ -74,7 +75,6 @@ const findupval = function(L, level) { } let uv = new UpVal(L); - uv.refcount = 0; uv.u.open.next = pp; uv.u.open.touched = true; -- cgit v1.2.3-70-g09d2