Adobe contributed the brand new Falcon ActionScript compiler to Apache Flex
Posted by Raju Bitter on 2012-09-12 22:31
15 man years of work went into Falcon, the next generation ActionScript compiler from Adobe. The compiler was contributed to Apache Flex this week:
https://svn.apache.org/repos/asf/incubator/flex/falcon/trunk/
https://cwiki.apache.org/confluence/display/FLEX/Falcon+Overview
The ActionScript compilation feature is production ready, and is integrated into Flash Builder 4.7. I've done a quick test run with the generated ActionScript 3 code of OpenLaszlo 5.0, and the compilation failes - due to stricter checking of the compiler. But the performance improvement for OpenLaszlo applications with Falcon could be big, especially for large applications.
"Falcon uses multiple threads to compile multiple files at the same time. It can even compile multiple method bodies in the same file in parallel. The more cores you have, the faster it goes, unlike the legacy compiler. The multiple threads are managed using Java Futures (java.util.concurrent.IFuture<V>). The maximum number of thread allowed to be used is a small multiple of the number of cores."
https://svn.apache.org/repos/asf/incubator/flex/falcon/trunk/
https://cwiki.apache.org/confluence/display/FLEX/Falcon+Overview
The ActionScript compilation feature is production ready, and is integrated into Flash Builder 4.7. I've done a quick test run with the generated ActionScript 3 code of OpenLaszlo 5.0, and the compilation failes - due to stricter checking of the compiler. But the performance improvement for OpenLaszlo applications with Falcon could be big, especially for large applications.
"Falcon uses multiple threads to compile multiple files at the same time. It can even compile multiple method bodies in the same file in parallel. The more cores you have, the faster it goes, unlike the legacy compiler. The multiple threads are managed using Java Futures (java.util.concurrent.IFuture<V>). The maximum number of thread allowed to be used is a small multiple of the number of cores."
Home / Developer API / Tour / Get a Project - Solutions for Bug & Issue Tracking, Collaboration Tools, Subversion Hosting, Git Hosting
Openlaszlo-community is powered by Assembla.
4 Comments
By Raju Bitter on 2012-09-13 02:11
lzl:
[echo] Compiling /home/raju/src/svn/openlaszlo/falcon/lps/includes/lfc/LFC11.swc
[java] Exception compiling scriptfile: org.openlaszlo.sc.CompilerError: tunit/line unknown: , in line: Error: Could not find source for class LzParam.
[java] Error: Could not find source for class $lzsc$mixin$LzDataElementMixin$LzDataNodeMixin$LzDataNode.
[java] Error: Could not find source for class $lzsc$mixin$LzDataElementMixin$LzDataNodeMixin$LzNode.
[java] Warning: Overlapping source path entries: /tmp/lzswf9/lzgen823976259878187354 is an ancestor of /tmp/lzswf9/lzgen823976259878187354/1
[java] Warning: LzIdleKernel is defined by multiple files: /tmp/lzswf9/lzgen823976259878187354/LzIdleKernel.as, /tmp/lzswf9/lzgen823976259878187354/1/LzIdleKernel.as
[java] /tmp/lzswf9/lzgen823976259878187354/$lz$class_PresentationType.as:4
[java] Error: Access of possibly undefined property constructor through a reference with static type $lz$class_PresentationType.
[java] return this.constructor.lzxtype
[java] /tmp/lzswf9/lzgen823976259878187354/$lzc$class_userClassPlacement.as:3
[java] Syntax error: '?' is not allowed here
[java] public function $lzc$class_userClassPlacement ($0:LzNode? = null, $1:Object? = null, $2 = null, $3 = null) {
[java] /tmp/lzswf9/lzgen823976259878187354/$lzc$class_userClassPlacement.as:3
[java] Syntax error: '?' is not allowed here
[java] public function $lzc$class_userClassPlacement ($0:LzNode? = null, $1:Object? = null, $2 = null, $3 = null) {
[java] /tmp/lzswf9/lzgen823976259878187354/$lzc$class_userClassPlacement.as:3
[java] Syntax error: Label must be a simple identifier.
[java] public function $lzc$class_userClassPlacement ($0:LzNode? = null, $1:Object? = null, $2 = null, $3 = null) {
[java] /tmp/lzswf9/lzgen823976259878187354/$lzc$class_userClassPlacement.as:3
[java] Syntax error: '=' is not allowed here
[java] public function $lzc$class_userClassPlacement ($0:LzNode? = null, $1:Object? = null, $2 = null, $3 = null) {
[java] /tmp/lzswf9/lzgen823976259878187354/$lzc$class_userClassPlacement.as:3
[java] Syntax error: Expected SCOPE_CLOSE but got ')'
[java] public function $lzc$class_userClassPlacement ($0:LzNode? = null, $1:Object? = null, $2 = null, $3 = null) {
[java] /tmp/lzswf9/lzgen823976259878187354/$lzc$class_userClassPlacement.as:4
[java] Error: Access of possibly undefined property $0.
[java] $0.defaultplacement = $1
[java] /tmp/lzswf9/lzgen823976259878187354/$lzc$class_userClassPlacement.as:4
[java] Error: Access of possibly undefined property $1.
[java] $0.defaultplacement = $1
[java] /tmp/lzswf9/lzgen823976259878187354/$lzsc$mixin$LzDataNodeMixin$LzNode.as:62
[java] Syntax error: '?' is not allowed here
..... (many many more)
By Raju Bitter on 2012-09-13 02:16
public function $lzc$class_userClassPlacement ($0:LzNode? = null, $1:Object? = null, $2 = null, $3 = null) {
Falcon complains about them.
By Raju Bitter on 2012-09-15 13:05
"These changes are for greater conformance with the ActionScript 3.0 Language Specification. The legacy compiler had bugs that allowed code to circumvent the language rules, these bugs have been addressed in ASC 2.0."
http://helpx.adobe.com/flash-builder/actionscript-compiler-backward-compatibility.html
By Raju Bitter on 2012-11-20 14:13