From deb8289d6afdde507bcd2d7897f58b0aaa6ad0a2 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Thu, 11 Jul 2019 20:57:18 -0700 Subject: [PATCH] Add missing opcodes the basicTest.m file, compiled by the Winamp3 compiler (and perhaps others) output these opcodes which are unknown to the decompiler. I _think_ this is what they are supposed to be. --- experiments/modern/src/maki-interpreter/constants.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/experiments/modern/src/maki-interpreter/constants.js b/experiments/modern/src/maki-interpreter/constants.js index 9d279833..5e3ac4dd 100644 --- a/experiments/modern/src/maki-interpreter/constants.js +++ b/experiments/modern/src/maki-interpreter/constants.js @@ -6,7 +6,7 @@ const COMMANDS = { short: "popTo", arg: "var", in: "0", - out: "0" + out: "0", // note in fact popTo takes one // argument but it is not visible to the parser because popTo // is always at the start of a function @@ -29,7 +29,7 @@ const COMMANDS = { name: "ret", short: "return", in: "1", - out: "0" // note: we claim that return + out: "0", // note: we claim that return // pops one argument from the stack, which ist not the full truth. }, @@ -56,6 +56,10 @@ const COMMANDS = { "80": { name: "logAnd", short: "&&", in: "2", out: "1" }, "81": { name: "logOr", short: "||", in: "2", out: "1" }, + // The decompiler has these next two as 90 and 91. + "88": { name: "lshift", short: "<<", in: "2", out: "1" }, + "89": { name: "rshift", short: ">>", in: "2", out: "1" }, + "90": { name: "lshift", short: "<<", in: "2", out: "1" }, "91": { name: "rshift", short: ">>", in: "2", out: "1" }, @@ -66,7 +70,7 @@ const COMMANDS = { "300": { name: "blockStart", short: "{", in: "0", out: "0" }, - "301": { name: "blockEnd", short: "}", in: "0", out: "0" } + "301": { name: "blockEnd", short: "}", in: "0", out: "0" }, }; module.exports = { COMMANDS };