I’ll make the portions even smaller. Today I just want to look at what goes into browserglobal.swc .
The best place to find our atom classes is the Tamarin source depot. In case you have never heard of Tamarin, it is Adobe’s open source version of the virtual machine that runs compiled ActionScript. Mozilla’s Tamarin project page looks a little bit like an abandoned space ship (“The Mozilla engineering team currently estimates that Tamarin will be incorporated into shipping versions of SpiderMonkey and Firefox in 2008”). But as far as I know Tamarin is still an active project. If you go to the Tamarin depot you’ll find under core a file called builtin.as, which includes 12 other ActionScript files:
include "Object.as" include "Class.as" include "Function.as" include "Namespace.as" include "Boolean.as" include "Number.as" include "Float.as" include "String.as" include "Array.as" include "actionscript.lang.as" include "Vector.as" include "DescribeType.as"
- Error (after adjusting the ctor)
- Number (only Number, not int and uint)
- actionscript.lang.as (except for isXMLName)
Here are my suggestions what we should do with the rest of the ActionScript classes in Tamarin’s core folder:
- Boolean – should be emulated
- Class – should be emulated
- Number – int and uint need to be implemented as IntClass and UIntClass in browser.swc
- Float – should be mapped to Number
- Vector – should be mapped to Array
- Namespace – should be mapped to package names
- XML – should be mapped to browser.AS3XML in browser.swc
- DescribeType – should go into avmplus of browser.swc
- Proxy – should go into flash.utils of flash.swc
- ByteArray – should go into flash.utils of flash.swc
Now that we have our list of classes that we picked as the bare minimum set for browserglobal.swc how shall we proceed?
Actually, it does seem to matter, because I have never been able to successfully build browserglobal.swc with FalconJS or in Flex. The only method that has worked for me is using a modified version of the Tamarin build scripts with the “standard” COMPC.