diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-29 13:42:12 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-29 13:43:12 +1000 |
commit | 86679f8530d0e0dec9e01027e186fd164bd0d1c3 (patch) | |
tree | 714bd1b04dfb2cf67d4c81c33447be0684304378 /src | |
parent | b3f5b92b221c0ad8a94b8cb95081bb85d235c39f (diff) | |
download | fengari-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')
-rw-r--r-- | src/lvm.js | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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]; |