YAY INLINE BYETCODE
It doesn't yet handle opcodes with arguments in my program for the inlining stage, but here's a simple example of what you can do with it:
import abc.*;
function test(a:Number,b:Number,c:Number):Number
{
__asm("max_stack 2",
"getlocal_1",
"getlocal_2",
"add",
"getlocal_3",
"add",
"returnvalue");
__asm_end();
return a*b*c;
}
test this in Flash, and the function will return the product of the 3 numbers,
run it through my program with the inlining option enabled, and the method will now return the sum of the 3 numbers :P
__asm() takes the opcodes to be inlined, whilst __asm__end() tells my program that anything after this (aka the code that is executed in the flash test) is to be removed.