summaryrefslogtreecommitdiff
path: root/src/lundump.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-05 15:24:00 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-05 15:41:29 +0200
commit7ef345bee73f6cc843b0d82866d036a3ac5829ca (patch)
tree11b170164238126952f3c790e18a74a7af629d48 /src/lundump.js
parent818a86ae8e4afe75f0521967125cdf1cca6b26f0 (diff)
downloadfengari-7ef345bee73f6cc843b0d82866d036a3ac5829ca.tar.gz
fengari-7ef345bee73f6cc843b0d82866d036a3ac5829ca.tar.bz2
fengari-7ef345bee73f6cc843b0d82866d036a3ac5829ca.zip
Binary chunk can be a lua string (string.dump)
Diffstat (limited to 'src/lundump.js')
-rw-r--r--src/lundump.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lundump.js b/src/lundump.js
index 5d158bd..26405d6 100644
--- a/src/lundump.js
+++ b/src/lundump.js
@@ -8,11 +8,11 @@ const lfunc = require('./lfunc.js');
const lobject = require('./lobject.js');
const lopcodes = require('./lopcodes.js');
-const LUAI_MAXSHORTLEN = 40;
-
class BytecodeParser {
constructor(L, dataView, name) {
+ assert(dataView instanceof DataView, "BytecodeParser only operates on a dataView")
+
this.L = L;
this.intSize = 4;
this.size_tSize = 8;