aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-14 21:39:16 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-14 21:40:39 +0100
commit829e47b9bd568c5722e9f59ca05036d2ae912ddf (patch)
tree40d51cbfa9449c0b07e7fb348d20365bc531e2f4 /src
parent8e19f368c2c40d99a92b39c6f566c7bcb2af6cf7 (diff)
downloadfengari-829e47b9bd568c5722e9f59ca05036d2ae912ddf.tar.gz
fengari-829e47b9bd568c5722e9f59ca05036d2ae912ddf.tar.bz2
fengari-829e47b9bd568c5722e9f59ca05036d2ae912ddf.zip
Launch scripts with luaD_call
Will adjust L.top correctly. Still isn't what lua's doing since we still miss the first 5 elements.
Diffstat (limited to 'src')
-rw-r--r--src/lvm.js24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 3f783af..cd9548e 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -169,8 +169,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMFLT, op1.value + op2.value);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_ADD);
- debugger;
- console.log(`TM_ADD: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -187,8 +185,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMFLT, op1.value - op2.value);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_SUB);
- debugger;
- console.log(`TM_SUB: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -205,8 +201,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMFLT, k[i.B].value * op2.value);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_MUL);
- debugger;
- console.log(`TM_MUL: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -223,8 +217,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMFLT, k[i.B].value % op2.value);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_MOD);
- debugger;
- console.log(`TM_MOD: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -239,8 +231,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMFLT, Math.pow(op1.value, op2.value));
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_POW);
- debugger;
- console.log(`TM_POW: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -255,8 +245,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMFLT, k[i.B].value / op2.value);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_DIV);
- debugger;
- console.log(`TM_DIV: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -273,8 +261,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMFLT, (op1.value / op2.value)|0);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_IDIV);
- debugger;
- console.log(`TM_IDIV: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -289,8 +275,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMINT, (op1.value & op2.value)|0);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_BAND);
- debugger;
- console.log(`TM_BAND: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -305,8 +289,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMINT, (op1.value | op2.value)|0);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_BOR);
- debugger;
- console.log(`TM_BOR: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -321,8 +303,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMINT, (op1.value ^ op2.value)|0);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_BXOR);
- debugger;
- console.log(`TM_BXOR: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -337,8 +317,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMINT, (op1.value << op2.value)|0);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_SHL);
- debugger;
- console.log(`TM_SHL: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;
@@ -353,8 +331,6 @@ const luaV_execute = function(L) {
L.stack[ra] = new TValue(CT.LUA_TNUMINT, (op1.value >> op2.value)|0);
} else {
ltm.luaT_trybinTM(L, op1, op2, ra, TMS.TM_SHR);
- debugger;
- console.log(`TM_SHR: ${L.stack[ra].value} (${ra})`);
base = ci.u.l.base;
}
break;