summaryrefslogtreecommitdiff
path: root/src/lvm.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-29 13:42:12 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-29 13:43:12 +1000
commit86679f8530d0e0dec9e01027e186fd164bd0d1c3 (patch)
tree714bd1b04dfb2cf67d4c81c33447be0684304378 /src/lvm.js
parentb3f5b92b221c0ad8a94b8cb95081bb85d235c39f (diff)
downloadfengari-86679f8530d0e0dec9e01027e186fd164bd0d1c3.tar.gz
fengari-86679f8530d0e0dec9e01027e186fd164bd0d1c3.tar.bz2
fengari-86679f8530d0e0dec9e01027e186fd164bd0d1c3.zip
src/lvm.js: OP_GETTABLE should use RB not RKB
Almost move into order similar to lua's lvm.c
Diffstat (limited to 'src/lvm.js')
-rw-r--r--src/lvm.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lvm.js b/src/lvm.js
index b7b1358..ce978f4 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -186,6 +186,12 @@ const luaV_execute = function(L) {
gettable(L, upval, rc, ra);
break;
}
+ case OCi.OP_GETTABLE: {
+ let rb = L.stack[RB(L, base, i)];
+ let rc = RKC(L, base, k, i);
+ gettable(L, rb, rc, ra);
+ break;
+ }
case OCi.OP_SETTABUP: {
let upval = cl.upvals[i.A].v;
let rb = RKB(L, base, k, i);
@@ -193,12 +199,6 @@ const luaV_execute = function(L) {
settable(L, upval, rb, rc);
break;
}
- case OCi.OP_GETTABLE: {
- let table = RKB(L, base, k, i);
- let key = RKC(L, base, k, i);
-
- gettable(L, table, key, ra);
- break;
}
case OCi.OP_SETTABLE: {
let table = L.stack[ra];