aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-01 15:59:14 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-02 07:38:57 +0100
commit0989db69a5c0b36b7b5c39f57510da879a0076b5 (patch)
treed835b16950636161319f423dea14f89aef0958d9 /src
parent19005492cf3b3597492e4fab9a2893dbdba1d42a (diff)
downloadfengari-0989db69a5c0b36b7b5c39f57510da879a0076b5.tar.gz
fengari-0989db69a5c0b36b7b5c39f57510da879a0076b5.tar.bz2
fengari-0989db69a5c0b36b7b5c39f57510da879a0076b5.zip
[Parsing tests] TAILCALL
Diffstat (limited to 'src')
-rw-r--r--src/lopcodes.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lopcodes.js b/src/lopcodes.js
index bfcd993..f679f85 100644
--- a/src/lopcodes.js
+++ b/src/lopcodes.js
@@ -243,6 +243,11 @@ const MASK0 = function(n, p) {
return (~MASK1(n, p));
};
+const SET_OPCODE = function(i, o) {
+ i.code = (i.code & MASK0(SIZE_OP, POS_OP)) | ((o << POS_OP) & MASK1(SIZE_OP, POS_OP));
+ fullins(i);
+};
+
const setarg = function(i, v, pos, size) {
i.code = (i.code & MASK0(size, pos)) | ((v << pos) & MASK1(size, pos));
fullins(i);
@@ -348,6 +353,7 @@ module.exports.SETARG_B = SETARG_B;
module.exports.SETARG_Bx = SETARG_Bx;
module.exports.SETARG_C = SETARG_C;
module.exports.SETARG_sBx = SETARG_sBx;
+module.exports.SET_OPCODE = SET_OPCODE;
module.exports.SIZE_A = SIZE_A;
module.exports.SIZE_Ax = SIZE_Ax;
module.exports.SIZE_B = SIZE_B;