diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-04-18 11:38:21 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-04-18 11:38:21 +0200 |
commit | 6be8db07196c407cd321a7b04f5022939c4ffce3 (patch) | |
tree | 1e979f818d2139a23a749d8536d8cc12b4858037 /src/lvm.js | |
parent | 4f415e5ca594c5b60e6fa6315b69acb41273ee7e (diff) | |
download | fengari-6be8db07196c407cd321a7b04f5022939c4ffce3.tar.gz fengari-6be8db07196c407cd321a7b04f5022939c4ffce3.tar.bz2 fengari-6be8db07196c407cd321a7b04f5022939c4ffce3.zip |
Cache all to_luastring of internal literals
Diffstat (limited to 'src/lvm.js')
-rw-r--r-- | src/lvm.js | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -602,19 +602,19 @@ const luaV_execute = function(L) { let nstep = tonumber(pstep); if (nlimit === false) - ldebug.luaG_runerror(L, lua.to_luastring("'for' limit must be a number")); + ldebug.luaG_runerror(L, lua.to_luastring("'for' limit must be a number", true)); plimit.type = CT.LUA_TNUMFLT; plimit.value = nlimit; if (nstep === false) - ldebug.luaG_runerror(L, lua.to_luastring("'for' step must be a number")); + ldebug.luaG_runerror(L, lua.to_luastring("'for' step must be a number", true)); pstep.type = CT.LUA_TNUMFLT; pstep.value = nstep; if (ninit === false) - ldebug.luaG_runerror(L, lua.to_luastring("'for' initial value must be a number")); + ldebug.luaG_runerror(L, lua.to_luastring("'for' initial value must be a number", true)); init.type = CT.LUA_TNUMFLT; init.value = ninit - nstep; @@ -988,7 +988,7 @@ const luaV_objlen = function(L, ra, rb) { default: { tm = ltm.luaT_gettmbyobj(L, rb, ltm.TMS.TM_LEN); if (tm.ttisnil()) - ldebug.luaG_typeerror(L, rb, lua.to_luastring("get length of")); + ldebug.luaG_typeerror(L, rb, lua.to_luastring("get length of", true)); break; } } @@ -1053,7 +1053,7 @@ const gettable = function(L, table, key, ra, recur) { recur = recur ? recur : 0; if (recur >= MAXTAGRECUR) - ldebug.luaG_runerror(L, lua.to_luastring("'__index' chain too long; possible loop")); + ldebug.luaG_runerror(L, lua.to_luastring("'__index' chain too long; possible loop", true)); if (table.ttistable()) { let element = table.__index(table, key); @@ -1074,7 +1074,7 @@ const luaV_finishget = function(L, t, key, val, slot, recur) { assert(!t.ttistable()); tm = ltm.luaT_gettmbyobj(L, t, ltm.TMS.TM_INDEX); if (tm.ttisnil()) - ldebug.luaG_typeerror(L, t, lua.to_luastring('index')); + ldebug.luaG_typeerror(L, t, lua.to_luastring('index', true)); } else { /* 't' is a table */ assert(slot.ttisnil()); tm = ltm.luaT_gettmbyobj(L, t, ltm.TMS.TM_INDEX); // TODO: fasttm @@ -1096,7 +1096,7 @@ const settable = function(L, table, key, v, recur) { recur = recur ? recur : 0; if (recur >= MAXTAGRECUR) - ldebug.luaG_runerror(L, lua.to_luastring("'__newindex' chain too long; possible loop")); + ldebug.luaG_runerror(L, lua.to_luastring("'__newindex' chain too long; possible loop", true)); if (table.ttistable()) { let element = table.__index(table, key); @@ -1123,7 +1123,7 @@ const luaV_finishset = function(L, t, key, val, slot, recur) { } else { /* not a table; check metamethod */ tm = ltm.luaT_gettmbyobj(L, t, ltm.TMS.TM_NEWINDEX); if (tm.ttisnil()) - ldebug.luaG_typeerror(L, t, lua.to_luastring('index')); + ldebug.luaG_typeerror(L, t, lua.to_luastring('index', true)); } if (tm.ttisfunction()) { |