From cdb82a10424543724388a00df5fb10b11efa8884 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 5 May 2017 13:27:04 +1000 Subject: Add a FIXME, remove a TODO, edit a comment --- src/lapi.js | 1 - src/lcode.js | 1 + src/llex.js | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lapi.js b/src/lapi.js index 78ae004..2c03c39 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -541,7 +541,6 @@ const lua_setupvalue = function(L, funcindex, n) { let val = aux.val; L.top--; - // TODO: what if it's not a pure TValue (closure, table) val.type = L.stack[L.top].type; val.value = L.stack[L.top].value; diff --git a/src/lcode.js b/src/lcode.js index c20c978..fac7d37 100644 --- a/src/lcode.js +++ b/src/lcode.js @@ -513,6 +513,7 @@ const luaK_stringK = function(fs, s) { ** are no "precision" problems. */ const luaK_intK = function(fs, n) { + /* FIXME: shouldn't use string as key. need to use pointer */ let k = new TValue(CT.LUA_TLNGSTR, defs.to_luastring(`${n}`)); let o = new TValue(CT.LUA_TNUMINT, n); return addk(fs, k, o); diff --git a/src/llex.js b/src/llex.js index 8375ac6..59c9015 100644 --- a/src/llex.js +++ b/src/llex.js @@ -142,7 +142,7 @@ class LexState { this.L = null; this.z = new MBuffer(); this.buff = new MBuffer(); /* buffer for tokens */ - this.h = null; /* to avoid collection/reuse strings */ + this.h = null; /* to reuse strings */ this.dyd = null; /* dynamic structures used by the parser */ this.source = null; /* current source name */ this.envn = null; /* environment variable name */ -- cgit v1.2.3-54-g00ecf