aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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": {