Here are below the main improvements added to the ActionScript compiler:
- Flash Builder 4.7 and the ASC 2.0 command-line compiler now share the same code model. This avoids duplicate representations of a program and means the IDE has an accurate representation of the language - matching the compiler.
- A new multi-threaded architecture allows multiple files to be compiled at once, improving compilation time.
- Better constant-folding and constant-propagation results in better performing code at runtime.
- Reduces function overhead by removing unnecessary activation records.
- Contains some demonstration byte-code optimizations for in-lining and dead code elimination.
- Non-linear control flow added to AS3 through a new 'goto' keyword.
- SWF 13 with LZMA compression is now supported.
- A new symbol management system means Flash Builder 4.7 ActionScript workspaces that mix Flash and AIR projects should incrementally compile much faster.
- ASC 2.0 based versions of fontswf, optimizer, swfdump and swcdepends command-line tools are available.
- Legacy versions of asdoc and fdb command-line tools are also still included.
- Font transcoding has been removed from [Embed] syntax. Fonts should be pre-transcoded and embedded as a SWF, which can be performed using a tool like fontswf or Flash Professional CS6.
- Relative paths in source code ([Embed] assets, includes, etc...) resolve relatively from the including file. To specify a path relative from a source root, prefix your path with a forward slash '/'.
- US English compiler error messages have been translated into French, Japanese, and Simplified Chinese. The locale is determined by the JVM and can be overridden using the -tools-locale configuration option.
A function can be inlined when the following constraints are met:
- The function is final, static or the containing scope is file or package
- The function does not contain any activations
- The function does not contain any try or with statements
- The function does not contain any function closures
- The function body contains less than 50 expressions
Read more: Introducing ASC 2.0
No comments:
Post a Comment