AbcExplorationLib is "a library to read and write ActionScript Byte Code (ABC) files. When completed it could be used for compiled program analysis or as part the back end of an experimental compiler. It is written in F# but it could be used from other .NET languages. Inspiration for this library comes from many excellent libraries for bytecode manipulation such as BCEL, ASM, Cecil or System.Reflection.Emit".
The blog entry linked to here, is about experimenting with ActionScript bytecode from IronPython; and in particular with the bytecode for the switch statement.
Given the following ActionScript code:
for(x = 1;x <>
We compile this file to a .abc file using the following command:
$ java -jar /opt/flex3sdk/lib/asc.jar testswitch.as
testswitch.abc, 280 bytes written
By using a little IronPython example included with AbcExplorationLib we can see how this library interprets the LookupSwitch opcode:
$ mono /opt/IronPython-2.0/ipy.exe ../ipyexample/abccontents.py testswitch.abc
And so on...