aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-24 15:33:12 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-24 15:33:12 +1000
commitc69b112c04b6905824401be5342b7a581f358f92 (patch)
treef407417fe2250322959c725853e8fa9fd4b5f41f
parentc25b209c8b7744916111dc0c4fd0b2a1ddc72352 (diff)
downloadfengari-c69b112c04b6905824401be5342b7a581f358f92.tar.gz
fengari-c69b112c04b6905824401be5342b7a581f358f92.tar.bz2
fengari-c69b112c04b6905824401be5342b7a581f358f92.zip
src/lvm.js: Remove non-wanted TODOs from OP_FORLOOP implementation
-rw-r--r--src/lvm.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lvm.js b/src/lvm.js
index cd197ab..c9f6bbf 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -522,18 +522,17 @@ const luaV_execute = function(L) {
if (0 < step ? idx <= limit : limit <= idx) {
ci.l_savedpc += i.sBx;
L.stack[ra].value = idx;
- L.stack[ra + 3] = new lobject.TValue(CT.LUA_TNUMINT, idx); // TODO: if tvalue already there, just update it
+ L.stack[ra + 3] = new lobject.TValue(CT.LUA_TNUMINT, idx);
}
} else { /* floating loop */
let step = L.stack[ra + 2].value;
let idx = L.stack[ra].value + step;
let limit = L.stack[ra + 1].value;
- // TODO: luai_numlt, luai_numle
if (0 < step ? idx <= limit : limit <= idx) {
ci.l_savedpc += i.sBx;
L.stack[ra].value = idx;
- L.stack[ra + 3] = new lobject.TValue(CT.LUA_TNUMFLT, idx); // TODO: if tvalue already there, just update it
+ L.stack[ra + 3] = new lobject.TValue(CT.LUA_TNUMFLT, idx);
}
}
break;