From 80555ae8258b29b7cd72301a8dac81a10f2a7eeb Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 4 Mar 2018 22:52:09 +1100 Subject: Remove unwanted TODOs --- src/lapi.js | 4 +--- src/lbaselib.js | 1 - src/ldo.js | 2 +- src/llex.js | 2 +- src/loadlib.js | 1 - src/loslib.js | 1 - 6 files changed, 3 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/lapi.js b/src/lapi.js index 21b6c0d..b011cda 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -900,7 +900,7 @@ const lua_islightuserdata = function(L, idx) { const lua_rawequal = function(L, index1, index2) { let o1 = index2addr(L, index1); let o2 = index2addr(L, index2); - return isvalid(o1) && isvalid(o2) ? lvm.luaV_equalobj(null, o1, o2) : 0; // TODO: isvalid ? + return isvalid(o1) && isvalid(o2) ? lvm.luaV_equalobj(null, o1, o2) : 0; }; const lua_arith = function(L, op) { @@ -996,8 +996,6 @@ const lua_pcallk = function(L, nargs, nresults, errfunc, ctx, k) { if (errfunc === 0) func = 0; else { - // let o = index2addr(L, errfunc); - // TODO: api_checkstackindex(L, errfunc, o); func = index2addr_(L, errfunc); } let funcOff = L.top - (nargs + 1); /* function to be called */ diff --git a/src/lbaselib.js b/src/lbaselib.js index 4212525..13644ef 100644 --- a/src/lbaselib.js +++ b/src/lbaselib.js @@ -382,7 +382,6 @@ const luaB_xpcall = function(L) { return finishpcall(L, status, 2); }; -// TODO: does it overwrite the upvalue of the previous closure ? const load_aux = function(L, status, envidx) { if (status === LUA_OK) { if (envidx !== 0) { /* 'env' parameter? */ diff --git a/src/ldo.js b/src/ldo.js index b138e47..5f849ca 100644 --- a/src/ldo.js +++ b/src/ldo.js @@ -393,7 +393,7 @@ const luaD_throw = function(L, errcode) { const luaD_rawrunprotected = function(L, f, ud) { let oldnCcalls = L.nCcalls; - let lj = { // TODO: necessary when using try/catch ? (ldo.c:47-52) + let lj = { status: LUA_OK, previous: L.errorJmp /* chain new error handler */ }; diff --git a/src/llex.js b/src/llex.js index 360e3d7..d9af318 100644 --- a/src/llex.js +++ b/src/llex.js @@ -653,7 +653,7 @@ const luaX_next = function(ls) { ls.t.token = ls.lookahead.token; /* use this one */ ls.t.seminfo.i = ls.lookahead.seminfo.i; ls.t.seminfo.r = ls.lookahead.seminfo.r; - ls.t.seminfo.ts = ls.lookahead.seminfo.ts; // TODO ? + ls.t.seminfo.ts = ls.lookahead.seminfo.ts; ls.lookahead.token = TK_EOS; /* and discharge it */ } else ls.t.token = llex(ls, ls.t.seminfo); /* read next token */ diff --git a/src/loadlib.js b/src/loadlib.js index 147b942..aa7a372 100644 --- a/src/loadlib.js +++ b/src/loadlib.js @@ -207,7 +207,6 @@ if (typeof process !== "undefined") { // Only with Node return true; }; } else { - /* TODO: use async/await ? */ readable = function(path) { path = to_uristring(path); let xhr = new XMLHttpRequest(); diff --git a/src/loslib.js b/src/loslib.js index 9a8a327..53a4228 100644 --- a/src/loslib.js +++ b/src/loslib.js @@ -244,7 +244,6 @@ if (typeof process === "undefined") { return 1; }; - // TODO: on POSIX system, should create the file const lua_tmpname = function() { return tmp.tmpNameSync(); }; -- cgit v1.2.3-70-g09d2