summaryrefslogtreecommitdiff
path: root/src/lcode.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-29 11:57:43 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-03-29 14:37:07 +0200
commit2e5b595a2e04fe72555a565af4aae43560946473 (patch)
tree750e770114181283acb0fd78f7ad241c17c3d9a7 /src/lcode.js
parent36f3247d47c1ad854fa89aabf17f6d954a6a6657 (diff)
downloadfengari-2e5b595a2e04fe72555a565af4aae43560946473.tar.gz
fengari-2e5b595a2e04fe72555a565af4aae43560946473.tar.bz2
fengari-2e5b595a2e04fe72555a565af4aae43560946473.zip
Never use js strings internally
Diffstat (limited to 'src/lcode.js')
-rw-r--r--src/lcode.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lcode.js b/src/lcode.js
index c0ca1ff..8b4a57c 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, "control structure too long");
+ llex.luaX_syntaxerror(fs.ls, lua.to_luastring("control structure too long"));
lopcode.SETARG_sBx(jmp, offset);
};
@@ -425,7 +425,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, "function or expression needs to many registers");
+ llex.luaX_syntaxerror(fs.ls, lua.to_luastring("function or expression needs to many registers"));
fs.f.maxstacksize = newstack;
}
};
@@ -1277,4 +1277,4 @@ module.exports.luaK_setmultret = luaK_setmultret;
module.exports.luaK_setoneret = luaK_setoneret;
module.exports.luaK_setreturns = luaK_setreturns;
module.exports.luaK_storevar = luaK_storevar;
-module.exports.luaK_stringK = luaK_stringK; \ No newline at end of file
+module.exports.luaK_stringK = luaK_stringK;