On 5/1/12 4:12 PM, "olegsivo...@gmail.com" <olegsivo...@gmail.com> wrote:
> For flash.* classes there seem to be only their constructors / some
> rather innocuous pieces of code, but the ES code is entirely embedded there.
> There's something difficult for me to understand though - what pieces of AS
> code from playerglobal actually go into resulting SWF, and why that code is
> there (because, obviously, most of it is not needed). What was the intent,
> or was it just a mistake? (I won't be surprised if it was).
I looked into the playerglobal binary, and ran a quick test. The conclusion
is that I am correct: code in playerglobal does not go into the output swf
because the API is marked native and the compiler knows better.
I would have to dig through the player source to confirm, but I was told in
the past that some parts of the player API are written in AS and I believe
the byte code or maybe the JIT of that code is embedded in the player.
I do know for sure that lots of player APIs have .as files representing them
that contain stubs. This is done in order to generate ASDoc for those
classes. Those .as files are in the player codebase and Adobe is not
planning to donate those files.
So, it appears that there are other .as files in there that contain actual
AS code that is probably also embedded into the player, but again none of
that gets linked into the output SWF.
--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui