From e691ea1911cf1d070ad7c6c256ce4558e2846cc9 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 26 Apr 2017 21:54:03 +1000 Subject: Remove unused variables --- src/lcode.js | 1 - src/lstate.js | 1 - tests/lapi.js | 3 --- tests/lbaselib.js | 3 --- tests/lcorolib.js | 3 --- tests/ldebug.js | 3 --- tests/lmathlib.js | 4 ---- tests/load.js | 1 - tests/lstrlib.js | 4 ---- tests/ltablib.js | 4 ---- tests/ltm.js | 4 ---- tests/lutf8lib.js | 1 - tests/lvm.js | 3 --- tests/tests.js | 4 +--- 14 files changed, 1 insertion(+), 38 deletions(-) diff --git a/src/lcode.js b/src/lcode.js index 19718f3..9fb7b06 100644 --- a/src/lcode.js +++ b/src/lcode.js @@ -11,7 +11,6 @@ require('./lstate.js'); /* XXX: if this isn't here then things break on require( const ltm = require('./ltm.js'); const lvm = require('./lvm.js'); const CT = defs.CT; -const OpCodes = lopcode.OpCodes; const OpCodesI = lopcode.OpCodesI; const TValue = lobject.TValue; diff --git a/src/lstate.js b/src/lstate.js index 0541a8e..23374c0 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -9,7 +9,6 @@ const ldo = require('./ldo.js'); const lapi = require('./lapi.js'); const luaT_init = require('./ltm.js').luaT_init; const CT = defs.constant_types; -const LUA_MULTRET = defs.LUA_MULTRET; const TS = defs.thread_status; const LUA_NUMTAGS = defs.LUA_NUMTAGS; diff --git a/tests/lapi.js b/tests/lapi.js index 8c7a81a..8b269b1 100644 --- a/tests/lapi.js +++ b/tests/lapi.js @@ -1,13 +1,10 @@ "use strict"; const test = require('tape'); -const beautify = require('js-beautify').js_beautify; const tests = require("./tests.js"); -const getState = tests.getState; const toByteCode = tests.toByteCode; -const VM = require("../src/lvm.js"); const lauxlib = require("../src/lauxlib.js"); const lua = require('../src/lua.js'); diff --git a/tests/lbaselib.js b/tests/lbaselib.js index 42730e4..137bc2f 100644 --- a/tests/lbaselib.js +++ b/tests/lbaselib.js @@ -1,13 +1,10 @@ "use strict"; const test = require('tape'); -const beautify = require('js-beautify').js_beautify; const tests = require("./tests.js"); -const getState = tests.getState; const toByteCode = tests.toByteCode; -const VM = require("../src/lvm.js"); const lauxlib = require("../src/lauxlib.js"); const lua = require('../src/lua.js'); diff --git a/tests/lcorolib.js b/tests/lcorolib.js index c180897..b18b528 100644 --- a/tests/lcorolib.js +++ b/tests/lcorolib.js @@ -1,13 +1,10 @@ "use strict"; const test = require('tape'); -const beautify = require('js-beautify').js_beautify; const tests = require("./tests.js"); -const getState = tests.getState; const toByteCode = tests.toByteCode; -const VM = require("../src/lvm.js"); const lauxlib = require("../src/lauxlib.js"); const lua = require('../src/lua.js'); const lstate = require('../src/lstate.js'); diff --git a/tests/ldebug.js b/tests/ldebug.js index dd1ec54..ba5c966 100644 --- a/tests/ldebug.js +++ b/tests/ldebug.js @@ -1,13 +1,10 @@ "use strict"; const test = require('tape'); -const beautify = require('js-beautify').js_beautify; const tests = require("./tests.js"); -const getState = tests.getState; const toByteCode = tests.toByteCode; -const lvm = require("../src/lvm.js"); const lauxlib = require("../src/lauxlib.js"); const lua = require('../src/lua.js'); diff --git a/tests/lmathlib.js b/tests/lmathlib.js index 42f5925..f894348 100644 --- a/tests/lmathlib.js +++ b/tests/lmathlib.js @@ -1,16 +1,12 @@ "use strict"; const test = require('tape'); -const beautify = require('js-beautify').js_beautify; const tests = require("./tests.js"); -const getState = tests.getState; const toByteCode = tests.toByteCode; -const VM = require("../src/lvm.js"); const lauxlib = require("../src/lauxlib.js"); const lua = require('../src/lua.js'); -const lstate = require('../src/lstate.js'); test('math.abs, math.sin, math.cos, math.tan, math.asin, math.acos, math.atan', function (t) { diff --git a/tests/load.js b/tests/load.js index 8b9031c..5f44bfa 100644 --- a/tests/load.js +++ b/tests/load.js @@ -5,7 +5,6 @@ const test = require('tape'); const tests = require("./tests.js"); const toByteCode = tests.toByteCode; -const VM = require("../src/lvm.js"); const lauxlib = require("../src/lauxlib.js"); const lua = require('../src/lua.js'); diff --git a/tests/lstrlib.js b/tests/lstrlib.js index 63c8158..b9d630d 100644 --- a/tests/lstrlib.js +++ b/tests/lstrlib.js @@ -1,10 +1,6 @@ "use strict"; const test = require('tape'); -const beautify = require('js-beautify').js_beautify; - -const tests = require("./tests.js"); -const toByteCode = tests.toByteCode; const lua = require("../src/lua.js"); const lauxlib = require("../src/lauxlib.js"); diff --git a/tests/ltablib.js b/tests/ltablib.js index 870d24c..00ce7c8 100644 --- a/tests/ltablib.js +++ b/tests/ltablib.js @@ -1,16 +1,12 @@ "use strict"; const test = require('tape'); -const beautify = require('js-beautify').js_beautify; const tests = require("./tests.js"); -const getState = tests.getState; const toByteCode = tests.toByteCode; -const VM = require("../src/lvm.js"); const lauxlib = require("../src/lauxlib.js"); const lua = require('../src/lua.js'); -const lstate = require('../src/lstate.js'); const inttable2array = function(t) { let a = []; diff --git a/tests/ltm.js b/tests/ltm.js index 358e396..b55e16a 100644 --- a/tests/ltm.js +++ b/tests/ltm.js @@ -1,15 +1,11 @@ "use strict"; const test = require('tape'); -const beautify = require('js-beautify').js_beautify; const lua = require("../src/lua.js"); -const VM = require("../src/lvm.js"); const lauxlib = require("../src/lauxlib.js"); -const OC = require('../src/lopcodes.js'); const tests = require("./tests.js"); -const getState = tests.getState; const toByteCode = tests.toByteCode; diff --git a/tests/lutf8lib.js b/tests/lutf8lib.js index 9449a93..28a45a5 100644 --- a/tests/lutf8lib.js +++ b/tests/lutf8lib.js @@ -1,7 +1,6 @@ "use strict"; const test = require('tape'); -const tests = require("./tests.js"); const lua = require("../src/lua.js"); const lauxlib = require("../src/lauxlib.js"); diff --git a/tests/lvm.js b/tests/lvm.js index ff3f505..266e345 100644 --- a/tests/lvm.js +++ b/tests/lvm.js @@ -1,10 +1,7 @@ "use strict"; const test = require('tape'); -const beautify = require('js-beautify').js_beautify; -const lua_State = require("../src/lstate.js").lua_State; -const VM = require("../src/lvm.js"); const lua = require("../src/lua.js"); const getState = require("./tests.js").getState; diff --git a/tests/tests.js b/tests/tests.js index 32efca1..6de0db3 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -6,11 +6,9 @@ const tmp = require('tmp'); const BytecodeParser = require("../src/lundump.js"); const lauxlib = require("../src/lauxlib.js"); -const VM = require("../src/lvm.js"); const toByteCode = function (luaCode) { - var luaFile = tmp.fileSync(), - bclist; + var luaFile = tmp.fileSync(); fs.writeSync(luaFile.fd, luaCode); -- cgit v1.2.3-70-g09d2