Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Apache FalconJX 0.7.0
-
None
-
Mac OS X 10.11
Description
compc included in FalconJX 0.7.0 seems to crash on the following class:
FalconJXCrash.as
package { public class FalconJXCrash { public function FalconJXCrash() { var foo:uint = generateInitialSeed(); } private function generateInitialSeed():uint { var seed:Number = new Date().time - Math.random() * int.MAX_VALUE; return seed; } } }
Separating the calculation of seed into two lines seems to solve the problem.
The exception returned by FalconJX is this:
java.lang.Enum.valueOf(Enum.java:238)org.apache.flex.compiler.internal.codegen.js.jx.BinaryOperatorEmitter$DateProperties.valueOf(BinaryOperatorEmitter.java:495)org.apache.flex.compiler.internal.codegen.js.jx.BinaryOperatorEmitter.specialCaseDate(BinaryOperatorEmitter.java:533)org.apache.flex.compiler.internal.codegen.js.jx.BinaryOperatorEmitter.emit(BinaryOperatorEmitter.java:252)org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter.emitBinaryOperator(JSFlexJSEmitter.java:696)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.visitBinaryOperator(ASBlockWalker.java:525)org.apache.flex.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:349)org.apache.flex.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)org.apache.flex.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)org.apache.flex.compiler.internal.codegen.js.goog.JSGoogEmitter.emitAssignedValue(JSGoogEmitter.java:910)org.apache.flex.compiler.internal.codegen.js.jx.VarDeclarationEmitter.emit(VarDeclarationEmitter.java:144)org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter.emitVarDeclaration(JSFlexJSEmitter.java:560)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.visitVariable(ASBlockWalker.java:264)org.apache.flex.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:163)org.apache.flex.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)org.apache.flex.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)org.apache.flex.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:40)org.apache.flex.compiler.internal.codegen.js.jx.StatementEmitter.emit(StatementEmitter.java:29)org.apache.flex.compiler.internal.codegen.js.JSEmitter.emitStatement(JSEmitter.java:327)org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter.emitStatement(JSFlexJSEmitter.java:783)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.visitBlock(ASBlockWalker.java:335)org.apache.flex.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:279)org.apache.flex.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)org.apache.flex.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)org.apache.flex.compiler.internal.codegen.as.ASEmitter.emitMethodScope(ASEmitter.java:843)org.apache.flex.compiler.internal.codegen.js.jx.MethodEmitter.emit(MethodEmitter.java:128)org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter.emitMethod(JSFlexJSEmitter.java:584)org.apache.flex.compiler.internal.codegen.js.jx.ClassEmitter.emit(ClassEmitter.java:119)org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter.emitClass(JSFlexJSEmitter.java:542)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.visitClass(ASBlockWalker.java:242)org.apache.flex.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:137)org.apache.flex.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)org.apache.flex.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)org.apache.flex.compiler.internal.codegen.js.goog.JSGoogEmitter.emitPackageContents(JSGoogEmitter.java:180)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.visitPackage(ASBlockWalker.java:230)org.apache.flex.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:133)org.apache.flex.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)org.apache.flex.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.visitFile(ASBlockWalker.java:209)org.apache.flex.compiler.internal.visitor.as.ASNodeSwitch.handle(ASNodeSwitch.java:129)org.apache.flex.compiler.internal.visitor.as.ASNodeHandler.handle(ASNodeHandler.java:85)org.apache.flex.compiler.internal.visitor.as.BeforeAfterStrategy.handle(BeforeAfterStrategy.java:110)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.walk(ASBlockWalker.java:157)org.apache.flex.compiler.internal.codegen.as.ASBlockWalker.visitCompilationUnit(ASBlockWalker.java:174)org.apache.flex.compiler.internal.codegen.js.JSWriter.writeTo(JSWriter.java:92)org.apache.flex.compiler.internal.codegen.js.JSWriter.writeTo(JSWriter.java:75)org.apache.flex.compiler.clients.COMPJSC.compile(COMPJSC.java:235)org.apache.flex.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:352)org.apache.flex.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:277)org.apache.flex.compiler.clients.COMPJSC.staticMainNoExit(COMPJSC.java:152)org.apache.flex.compiler.clients.COMPJSC.main(COMPJSC.java:100)