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/lcode.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/lcode.js')
-rw-r--r-- | src/lcode.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lcode.js b/src/lcode.js index 0b3d9bd..ec233c6 100644 --- a/src/lcode.js +++ b/src/lcode.js @@ -183,7 +183,7 @@ const fixjump = function(fs, pc, dest) { let offset = dest - (pc + 1); assert(dest !== NO_JUMP); if (Math.abs(offset) > lopcode.MAXARG_sBx) - llex.luaX_syntaxerror(fs.ls, lua.to_luastring("control structure too long")); + llex.luaX_syntaxerror(fs.ls, lua.to_luastring("control structure too long", true)); lopcode.SETARG_sBx(jmp, offset); }; @@ -424,7 +424,7 @@ const luaK_checkstack = function(fs, n) { let newstack = fs.freereg + n; if (newstack > fs.f.maxstacksize) { if (newstack >= MAXREGS) - llex.luaX_syntaxerror(fs.ls, lua.to_luastring("function or expression needs to many registers")); + llex.luaX_syntaxerror(fs.ls, lua.to_luastring("function or expression needs to many registers", true)); fs.f.maxstacksize = newstack; } }; @@ -1230,7 +1230,7 @@ const luaK_setlist = function(fs, base, nelems, tostore) { codeextraarg(fs, c); } else - llex.luaX_syntaxerror(fs.ls, lua.to_luastring("constructor too long")); + llex.luaX_syntaxerror(fs.ls, lua.to_luastring("constructor too long", true)); fs.freereg = base + 1; /* free registers with list values */ }; |