From c428f1241ebd5194a37c37d9d5376b326b78ee37 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Wed, 15 Feb 2017 09:22:11 +0100 Subject: Implementing minimal path from main to luaV_execute of user script --- src/lvm.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lvm.js') 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}`; } -- cgit v1.2.3-70-g09d2