summaryrefslogtreecommitdiff
path: root/src/ldo.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-08 13:52:23 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-08 15:31:35 +1000
commitfa95131b744556350c6e2e7a94c9f311ed09b658 (patch)
treedfdd5555970f3b5fc2ea858a10c6ff66e7bfbde5 /src/ldo.js
parent2977fe002407b6f86efa4ba5216f567082f33e45 (diff)
downloadfengari-fa95131b744556350c6e2e7a94c9f311ed09b658.tar.gz
fengari-fa95131b744556350c6e2e7a94c9f311ed09b658.tar.bz2
fengari-fa95131b744556350c6e2e7a94c9f311ed09b658.zip
Clean up lundump.js
- Don't export a class (instead export luaU_undump) - Make error messages the same as normal lua
Diffstat (limited to 'src/ldo.js')
-rw-r--r--src/ldo.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ldo.js b/src/ldo.js
index 39ba4dc..a8ed1dc 100644
--- a/src/ldo.js
+++ b/src/ldo.js
@@ -4,7 +4,6 @@
const assert = require('assert');
const defs = require('./defs.js');
-const BytecodeParser = require('./lundump.js');
const lapi = require('./lapi.js');
const ldebug = require('./ldebug.js');
const lfunc = require('./lfunc.js');
@@ -15,6 +14,7 @@ const lparser = require('./lparser.js');
const lstate = require('./lstate.js');
const lstring = require('./lstring.js');
const ltm = require('./ltm.js');
+const lundump = require('./lundump.js');
const lvm = require('./lvm.js');
const CT = defs.constant_types;
const TS = defs.thread_status;
@@ -575,7 +575,7 @@ const f_parser = function(L, p) {
let c = p.z.getc(); /* read first character */
if (c === defs.LUA_SIGNATURE.charCodeAt(0)) {
checkmode(L, p.mode, defs.to_luastring("binary", true));
- cl = new BytecodeParser(L, p.z, p.name).luaU_undump();
+ cl = lundump.luaU_undump(L, p.z, p.name);
} else {
checkmode(L, p.mode, defs.to_luastring("text", true));
cl = lparser.luaY_parser(L, p.z, p.buff, p.dyd, p.name, c);