Hacker News new | past | comments | ask | show | jobs | submit login

> If the bytecode generated by the AS compiler doesn't match what a JS VM can execute, then, since the AS bytecode will necessarily mimic features available in the language (and the languages are similar), why can't we translate the AS bytecode into JS bytecode?

That's essentially what Shumway does. Unless things have significantly changed over the last year when I last looked at it, Shumway's AVM2 implementation is a JIT that compiles ActionScript to JavaScript (and thereby produces JS bytecode by going through "eval"). The tricky thing is that, because of extra features that ActionScript has that JS doesn't (namespaces, most notably) it has to speculate and recompile as needed to get good performance. So Shumway isn't an ahead-of-time static JIT, but it is a dynamically recompiling JIT.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: