aboutsummaryrefslogtreecommitdiff
path: root/src/lcode.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lcode.js')
-rw-r--r--src/lcode.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lcode.js b/src/lcode.js
index 9a5cda0..a2dc43b 100644
--- a/src/lcode.js
+++ b/src/lcode.js
@@ -46,6 +46,10 @@ const UnOpr = {
OPR_NOUNOPR: 4
};
+const getinstruction = function(fs, e) {
+ return fs.f.code[e.u.info];
+};
+
/*
** Gets the destination address of a jump instruction. Used to traverse
** a list of jumps.
@@ -249,6 +253,7 @@ const luaK_codeAsBx = function(fs,o,A,sBx) {
module.exports.BinOpr = BinOpr;
module.exports.NO_JUMP = NO_JUMP;
module.exports.UnOpr = UnOpr;
+module.exports.getinstruction = getinstruction;
module.exports.luaK_codeABC = luaK_codeABC;
module.exports.luaK_codeABx = luaK_codeABx;
module.exports.luaK_codeAsBx = luaK_codeAsBx;