From c69b112c04b6905824401be5342b7a581f358f92 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 24 May 2017 15:33:12 +1000 Subject: src/lvm.js: Remove non-wanted TODOs from OP_FORLOOP implementation --- src/lvm.js | 5 ++--- 1 file 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; -- cgit v1.2.3-70-g09d2