Mjo analysis - AtomCrafty/MajiroTools Wiki

Mjo analysis

Compiled .mjo scripts are very literal when translated into instructions. There are no optimizations (with one exception of the switch instruction).

Because of this, and also because of the line instructions, there are a lot of hints that make it easy to price back the original source code.

Line instruction

Lines are marked in every file, regardless of the #use_readflg preprocessor option. This is because they are also used by the Majiro debugger for handling breakpoints.

Line instructions appear when:

They do not appear for:

Switch instructions

Switches can take two forms:

Unsorted notes

(These will eventually be moved to their own sections)

while and for loops use brfalse, do ... while loops use brtrue.

some notes:

Term: "dominates"

Block A "dominates" block B if A is always executed before B on every possible execution path.

That relationship is commonly used in all sorts of static analyses.