With the release of the Flex 3 SDK the ActionScript compiler (ASC) became open-source as well. As you know I am working on my own “compiler” to inline bytecode directly with ActionScript. My approach is a post-compile compiler because I wrote it while the ASC was still closed source and ther was no way to do that different.
I still like the approach but it is of course not the best way. The only logical consequence now is to write a patch for the ASC and add some new keywords to it. This would be also easier than what I have to do currently because I am working with bytecode only and the compiler is half a compiler and half a virtual machine. I think it would be great if a community starts to evolve around the SDK and builds a version with more advanced features. Nicolas?




Metal Hurlant have already partialy implement in Actionscript the Tamarin project.
http://metal.hurlant.com/blog/2008/01/02/flash/eval-and-actionscript/
Maybe you can work on it together ?
Hey,
it is very nice to see someone do this but actually it is a totally different project and I also do not like eval() at all because it is bad practice in my opinion.
I really like your work joa!
Keep up the good work!
Yup. eval() is probably the most misused construct in javascript.
I think a closer match for your project might be Haxe’s hxasm project: http://haxe.org/hxasm
It’s probably more fun to write your own, but you might be able to compare notes, or something.
On the other hand, tamarin does include a bytecode emitter, which would allow one to pick which bytecodes to put together at runtime..
Metal: I know about hxasm for a long time and on the old AS3C roadmap is still the port to haXe.
I am in contact with Nicolas for certain issues and he helped me a lot during the past. The only problem is right now that I do not find the time to port all the code to haXe because I want to do it right and therefore I have to write a lot of stuff (starting with a haXe ByteArray for instance).
I also though about integrating what my tool does into the real ASC but for several reasons I think it would be a bad idea.