diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-22 12:16:46 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-22 14:06:14 +1000 |
commit | 70e485206d08913cf9709db8e6b589b3df34711e (patch) | |
tree | 2bacd5cbae20fb267288605cf2feb03007253657 /src/ltable.js | |
parent | 9bd1b0764105305c67aaf083804aa1e75911d74b (diff) | |
download | fengari-70e485206d08913cf9709db8e6b589b3df34711e.tar.gz fengari-70e485206d08913cf9709db8e6b589b3df34711e.tar.bz2 fengari-70e485206d08913cf9709db8e6b589b3df34711e.zip |
Add TMcache
Diffstat (limited to 'src/ltable.js')
-rw-r--r-- | src/ltable.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ltable.js b/src/ltable.js index e4d21e2..0ed56ab 100644 --- a/src/ltable.js +++ b/src/ltable.js @@ -39,9 +39,14 @@ class Table { this.f = void 0; /* first entry */ this.l = void 0; /* last entry */ this.metatable = null; + this.flags = ~0; } } +const invalidateTMcache = function(t) { + t.flags = 0; +}; + const add = function(t, hash, key, value) { t.dead_strong.clear(); t.dead_weak = void 0; @@ -204,6 +209,7 @@ const luaH_next = function(L, table, keyI) { return true; }; +module.exports.invalidateTMcache = invalidateTMcache; module.exports.luaH_delete = luaH_delete; module.exports.luaH_get = luaH_get; module.exports.luaH_getint = luaH_getint; |