diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-05-02 11:06:38 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-05-02 11:06:38 +0200 |
commit | f2bb5dee9b90197185dd0367cee98b61b066ae70 (patch) | |
tree | b3222d28e409053e6c6e1036de25c8e5701c9d7d /src/lundump.js | |
parent | d35f4e1dcec1494483a9257b7a2cacb172047c1f (diff) | |
parent | 59d5ff59e3b9eacc2b2aa8e92e71f31914d09545 (diff) | |
download | fengari-f2bb5dee9b90197185dd0367cee98b61b066ae70.tar.gz fengari-f2bb5dee9b90197185dd0367cee98b61b066ae70.tar.bz2 fengari-f2bb5dee9b90197185dd0367cee98b61b066ae70.zip |
Merge remote-tracking branch 'daurnimator/fix-errors'
Diffstat (limited to 'src/lundump.js')
-rw-r--r-- | src/lundump.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lundump.js b/src/lundump.js index 9162501..1d2d079 100644 --- a/src/lundump.js +++ b/src/lundump.js @@ -1,12 +1,12 @@ /*jshint esversion: 6 */ "use strict"; -const assert = require('assert'); +const assert = require('assert'); -const defs = require('./defs.js'); -const lobject = require('./lobject.js'); -const Proto = require('./lfunc.js').Proto; -const OpCodes = require('./lopcodes.js'); +const defs = require('./defs.js'); +const lfunc = require('./lfunc.js'); +const lobject = require('./lobject.js'); +const lopcodes = require('./lopcodes.js'); const LUAI_MAXSHORTLEN = 40; @@ -128,7 +128,7 @@ class BytecodeParser { readCode(f) { let n = this.readInt(); - let o = OpCodes; + let o = lopcodes; let p = BytecodeParser; for (let i = 0; i < n; i++) { @@ -191,7 +191,7 @@ class BytecodeParser { let n = this.readInt(); for (let i = 0; i < n; i++) { - f.p[i] = new Proto(this.L); + f.p[i] = new lfunc.Proto(this.L); this.readFunction(f.p[i], f.source); } } @@ -280,12 +280,12 @@ class BytecodeParser { luaU_undump() { this.checkHeader(); - let cl = new lobject.LClosure(this.L, this.readByte()); + let cl = lfunc.luaF_newLclosure(this.L, this.readByte()); this.L.stack[this.L.top] = new lobject.TValue(defs.CT.LUA_TLCL, cl); this.L.top++; - cl.p = new Proto(); + cl.p = new lfunc.Proto(); this.readFunction(cl.p); |