diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-05 14:40:14 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-05 14:40:14 +1000 |
commit | 4a265e29565718684ce30a7e90263da0ba71a0c1 (patch) | |
tree | ec9de879792db8fb9df8e56063a471ace592b89c | |
parent | 7de17e1f67ec8da30d19450f6de05c8b5ad6e10e (diff) | |
download | fengari-4a265e29565718684ce30a7e90263da0ba71a0c1.tar.gz fengari-4a265e29565718684ce30a7e90263da0ba71a0c1.tar.bz2 fengari-4a265e29565718684ce30a7e90263da0ba71a0c1.zip |
src/lfunc: Move refcount initialisation into constructor
-rw-r--r-- | src/lfunc.js | 2 |
1 files changed, 1 insertions, 1 deletions
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; |