[mtasc] MTASC Code Block
Nicolas Cannasse
ncannasse at motion-twin.com
Mon Mar 7 18:25:11 CET 2005
> I would like to extend the KineticFusion decompiler to decompile mtasc
> classes as AS2.0 instead of the currently-restricted AS1.0. Before this
> is started, I was wondering whether there is a good reason why there is
> only a single code block for all MTASC-compiled classes? As you know,
> both MMC and KineticFusion use a separate InitClip code block for each
> AS2.0 class.
>
> The advantages I see from having separate code blocks are:
> Maximise the use of the ActionScript constant pool (this is
> restricted to 64K) - any code block that contain strings greater that
> this must use String constants
> Ability to compare, on a byte-code level using flasm, similar
> blocks of code from MMC, KineticFusion and MTASC. This is really useful
> for debugging behavioral differences between compiled code from multiple
> compilers.
> Using KineticFusion and XSL, this provides the ability to
> extract a single block of code from multiple RVML files and compare
> them. This is extremely useful, for example, if writing a stylesheet to
> optimise a group of SWF movies by removing common assets such as AS2.0
> classes.
>
> What are the advantages of having a single huge code block?
Mostly size. Since you have only one constant string pool, you can reduce
the compressed SWF size by several Kbytes which is good. Also, it's more
difficult for decompilers to understand MTASC, so it adds a little bit of
safety. This behavior can be turned off using -separate commandline
parameter.
Nicolas
More information about the mtasc
mailing list