aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-29 13:42:52 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-29 13:43:13 +1000
commit02bec8525e5dbdb9de0268d666af7511bb130e64 (patch)
treeca7f1daa18ef6009dd9b2bd31cf2c965014d4295
parent86679f8530d0e0dec9e01027e186fd164bd0d1c3 (diff)
downloadfengari-02bec8525e5dbdb9de0268d666af7511bb130e64.tar.gz
fengari-02bec8525e5dbdb9de0268d666af7511bb130e64.tar.bz2
fengari-02bec8525e5dbdb9de0268d666af7511bb130e64.zip
src/lvm.js: Move OP_SETUPVAL into opcode order location
-rw-r--r--src/lvm.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lvm.js b/src/lvm.js
index ce978f4..31ad74d 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -175,11 +175,6 @@ const luaV_execute = function(L) {
lobject.setobj2s(L, ra, cl.upvals[b].v);
break;
}
- case OCi.OP_SETUPVAL: {
- let uv = cl.upvals[i.B];
- uv.v.setfrom(L.stack[ra]);
- break;
- }
case OCi.OP_GETTABUP: {
let upval = cl.upvals[i.B].v;
let rc = RKC(L, base, k, i);
@@ -199,6 +194,10 @@ const luaV_execute = function(L) {
settable(L, upval, rb, rc);
break;
}
+ case OCi.OP_SETUPVAL: {
+ let uv = cl.upvals[i.B];
+ uv.v.setfrom(L.stack[ra]);
+ break;
}
case OCi.OP_SETTABLE: {
let table = L.stack[ra];