Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AS3 and Actionsctipt Virtual Machine #224

Open
Alan12312020 opened this issue Dec 19, 2020 · 3 comments
Open

AS3 and Actionsctipt Virtual Machine #224

Alan12312020 opened this issue Dec 19, 2020 · 3 comments

Comments

@Alan12312020
Copy link

Huge volume of games written in Actionscript 3, please include this language

@chicoxyzzy
Copy link
Member

Where do you think it should be mentioned on the website? AS 3 is a different technology and not really related to WebAssembly, but maybe I'm missing something?

@lars-t-hansen
Copy link
Contributor

The target of AS3 compilation was a (partly) statically typed, ahead-of-time verified, ahead-of-time jitted, compact bytecode for the AVM2 virtual machine, which ran in web browsers. I dunno, "different"? The spec should be the top hit if you google "avm2 specification". The AVM2 was not great at executing JS-style code (and had other problems) but did very well when presented with typed code, which AS3 accomodated. Large web applications - larger than those really accomodated by JS at the time - were built using AS3 and the Flex toolkit.

We'd have to ask @kripken about the origins of emscripten to be sure, but one project at Adobe in the AVM2 era was Alchemy, which compiled C++ to well-typed AVM2 code to allow it to run with good performance on the web, see eg https://en.wikipedia.org/wiki/CrossBridge. It's somewhat plausible that this was an inspiration for what later became emscripten, then asm.js, and then wasm.

@kripken
Copy link
Member

kripken commented Feb 19, 2021

@lars-t-hansen It existed before, but it wasn't an inspiration for Emscripten as it happens. It could have been though, had I known about it...

Yes, there were big similarities. I was definitely aware of Alchemy by 2012 when I gave part of a GDC Online talk about Emscripten. I remember we compared to Alchemy there. That might have been the height of Alchemy's popularity, I remember they gave a talk about it at the same event (I still have some swag they handed out actually). And yeah, like Emscripten and later asm.js and wasm, Alchemy allowed compiled C++ (or really LLVM IR) to be run on a VM that wasn't originally intended for it, and at the time Flash was in almost all browsers so it was an effective way to reach users (but not free - they charged 9% of revenue IIRC).

(Emscripten's inspiration FWIW was basically "let's see if I can translate LLVM IR into JavaScript so I can run my game engine on the Web".)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants