summaryrefslogtreecommitdiff
path: root/src/lvm.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-15 09:22:11 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-15 17:07:58 +0100
commitc428f1241ebd5194a37c37d9d5376b326b78ee37 (patch)
tree6e0357f728f525da8e27d73bcbc94ec8ce05c645 /src/lvm.js
parentf94e2902d6e2e45840c5a63d46c57ddd888b84b8 (diff)
downloadfengari-c428f1241ebd5194a37c37d9d5376b326b78ee37.tar.gz
fengari-c428f1241ebd5194a37c37d9d5376b326b78ee37.tar.bz2
fengari-c428f1241ebd5194a37c37d9d5376b326b78ee37.zip
Implementing minimal path from main to luaV_execute of user script
Diffstat (limited to 'src/lvm.js')
-rw-r--r--src/lvm.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 07a9f96..5ba568d 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -11,7 +11,6 @@ const LUA_MULTRET = lua.LUA_MULTRET;
const lobject = require('./lobject.js');
const TValue = lobject.TValue;
const Table = lobject.Table;
-const TString = lobject.TString;
const LClosure = lobject.LClosure;
const lfunc = require('./lfunc.js');
const UpVal = lfunc.UpVal;
@@ -879,7 +878,7 @@ const tostring = function(L, i) {
let str = `${o.value}`;
if (o.ttisstring() || (o.ttisnumber() && !isNaN(parseFloat(`${str}`)))) {
- L.stack[i] = new TString(str);
+ L.stack[i] = new TValue(CT.LUA_TLNGSTR, str);
return true;
}
@@ -914,7 +913,7 @@ const luaV_concat = function(L, total) {
tl += l;
}
- let ts = new TString("");
+ let ts = new TValue(CT.LUA_TLNGSTR, "");
for (let i = n; i > 0; i--) {
ts.value = `${ts.value}${L.stack[top - i].value}`;
}