aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-11 15:38:14 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-11 15:38:40 +0100
commit4650ac9ab96eadcd5918c56c6eb93618ac054bba (patch)
treee29a16e24c5a245889fff7bf74f701720a8c8227 /src
parenta7b98a2e62c49a6c0ced2b57ddcea9bb6bab108e (diff)
downloadfengari-4650ac9ab96eadcd5918c56c6eb93618ac054bba.tar.gz
fengari-4650ac9ab96eadcd5918c56c6eb93618ac054bba.tar.bz2
fengari-4650ac9ab96eadcd5918c56c6eb93618ac054bba.zip
SELF
Diffstat (limited to 'src')
-rw-r--r--src/lvm.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 7b70c01..7ca6921 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -149,6 +149,17 @@ class LuaVM {
break;
}
case "OP_SELF": {
+ let table = L.stack[this.RB(base, i)];
+ let key = this.RKC(base, k, i);
+
+ L.stack[ra + 1] = table;
+
+ // if (!table.ttistable() || !table.metatable.__index(table, key)) {
+ // // __index
+ // } else {
+ L.stack[ra] = table.metatable.__index(table, key);
+ // }
+
break;
}
case "OP_ADD": {