diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-15 09:22:11 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-15 17:07:58 +0100 |
commit | c428f1241ebd5194a37c37d9d5376b326b78ee37 (patch) | |
tree | 6e0357f728f525da8e27d73bcbc94ec8ce05c645 /src/lvm.js | |
parent | f94e2902d6e2e45840c5a63d46c57ddd888b84b8 (diff) | |
download | fengari-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.js | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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}`; } |