Replies: 1 comment 9 replies
-
Hi I had wondered a while ago about whether it would help accessibility/take-up of AIR to switch to using V8 instead of the current ActionScript virtual machine, and then to have a way for people to compile their existing ActionScript functions into JavaScript. I think though, we would be more likely to look at the idea of a TypeScript to ABC compiler (like there is currently for C++ to ABC, with the 'Crossbridge' project) since switching out the code processing would be a massive effort, and trying to have multiple engines would likely be fraught with difficulties! Plus don't forget V8 isn't allowed on iOS devices, The idea of an HTML-based AIR application is one I always found a little odd... but, that had been using a very old WebKit library that didn't then work on the new Apple silicon macOS platforms, so we have dropped that in favour of using the "StageWebView" component for providing HTML/JS capabilities. This just loads in whatever webview-type capability is provided by the operating system, which at least means it works across desktop and mobile devices, even though that also means that capabilities vary by platform. Thanks for the discussion though .. I'd be interested in the background to your thoughts here i.e. why you're thinking it would be handy to have V8 provided in the AIR runtime?! thanks |
Beta Was this translation helpful? Give feedback.
-
V8 (the JavaScript engine used in Chromium, NodeJS and Deno) should be more ideal for executing JavaScript (specially TypeScript). Usually TypeScript is combined with bundling tools such as Webpack, Rollup, Parcel, Vite, Turbopack and more.
I'm thinking of translating a single untyped TypeScript bundle into AVM2 bytecode, but, besides it being possibly inefficient — not sure whether AVM2 does untyped code optimizations like property caching like V8 does — I'm not sure it'd be possible to install ANEs that way because, since it's an untyped JS bundle, things like classes are created as "constructor" functions with the
prototype
property assigned dynamically, and not as "AVM2 classes" (using the constant pool). The reason for that is inclusively because the class's "extends" clause is dynamic and can't be resolved ahead-of-time.If Adobe AIR were to provide AIR developers with V8, I'm not sure how ANEs would be used, but it might work.
I'm not sure how difficult it might be to integrate V8 with the platform too... Just exploring!
About AIR HTML content...
It looks like AIR supports HTML content, but it's only for desktop devices.
And the ANE question remains.
Beta Was this translation helpful? Give feedback.
All reactions