diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-23 17:09:03 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-27 22:14:29 +1000 |
commit | b3c87776e08f546a9994527f7c2c7fc4ec07d9a1 (patch) | |
tree | d12ee5c396408d8a0d8e5e2d2cb74f46eb1b1e19 /src/lobject.js | |
parent | 51ea4bdd2d2ac1166911b54ba5a1aa6aa8a573dd (diff) | |
download | fengari-b3c87776e08f546a9994527f7c2c7fc4ec07d9a1.tar.gz fengari-b3c87776e08f546a9994527f7c2c7fc4ec07d9a1.tar.bz2 fengari-b3c87776e08f546a9994527f7c2c7fc4ec07d9a1.zip |
Introduce setobjs2s
Diffstat (limited to 'src/lobject.js')
-rw-r--r-- | src/lobject.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lobject.js b/src/lobject.js index b6fd581..7b8a332 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -185,6 +185,11 @@ class TValue { } +/* from stack to (same) stack */ +const setobjs2s = function(L, newidx, oldidx) { + L.stack[newidx] = L.stack[oldidx]; +}; + const luaO_nilobject = new TValue(CT.LUA_TNIL, null); Object.freeze(luaO_nilobject); module.exports.luaO_nilobject = luaO_nilobject; @@ -667,3 +672,4 @@ module.exports.luaO_tostring = luaO_tostring; module.exports.luaO_utf8desc = luaO_utf8desc; module.exports.luaO_utf8esc = luaO_utf8esc; module.exports.numarith = numarith; +module.exports.setobjs2s = setobjs2s; |