You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When evaluating constant expressions when instantiating if the divider becomes 0 the compilation crashes, even when protected by an if-statement.
Compilation failed, no output written.
/ by zero :: java.lang.ArithmeticException: / by zero
java.lang.ArithmeticException: / by zero
at org.caltoopia.ast2ir.ConstantExpressionEvaluator.caseBinaryExpression(ConstantExpressionEvaluator.java:358)
at org.caltoopia.ir.util.IrReplaceSwitch.caseBinaryExpression(IrReplaceSwitch.java:1)
at org.caltoopia.ir.util.IrSwitch.doSwitch(IrSwitch.java:274)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.caltoopia.ir.util.IrReplaceSwitch.caseProcCall(IrReplaceSwitch.java:572)
at org.caltoopia.ir.util.IrReplaceSwitch.caseProcCall(IrReplaceSwitch.java:1)
at org.caltoopia.ir.util.IrSwitch.doSwitch(IrSwitch.java:377)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.caltoopia.ast2ir.ConstantExpressionEvaluator.caseBlock(ConstantExpressionEvaluator.java:222)
at org.caltoopia.ast2ir.ConstantExpressionEvaluator.caseBlock(ConstantExpressionEvaluator.java:1)
at org.caltoopia.ir.util.IrReplaceSwitch.caseBlock(IrReplaceSwitch.java:1)
at org.caltoopia.ir.util.IrSwitch.doSwitch(IrSwitch.java:409)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.caltoopia.ir.util.IrReplaceSwitch.caseIfStatement(IrReplaceSwitch.java:623)
at org.caltoopia.ir.util.IrReplaceSwitch.caseIfStatement(IrReplaceSwitch.java:1)
at org.caltoopia.ir.util.IrSwitch.doSwitch(IrSwitch.java:401)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.caltoopia.ir.util.IrReplaceSwitch.caseAction(IrReplaceSwitch.java:241)
at org.caltoopia.ast2ir.ConstantExpressionEvaluator.caseAction(ConstantExpressionEvaluator.java:209)
at org.caltoopia.ir.util.IrReplaceSwitch.caseActor(IrReplaceSwitch.java:195)
at org.caltoopia.ir.util.IrReplaceSwitch.caseActor(IrReplaceSwitch.java:1)
at org.caltoopia.ir.util.IrSwitch.doSwitch(IrSwitch.java:137)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.caltoopia.ast2ir.ConstantExpressionEvaluator.evaluate(ConstantExpressionEvaluator.java:180)
at org.caltoopia.ast2ir.Instantiator.instantiate(Instantiator.java:88)
at org.caltoopia.cli.Cal2C.generate(Cal2C.java:352)
at org.caltoopia.frontend.ui.launch.CaltoopiaLaunchConfigurationDelegate.launch(CaltoopiaLaunchConfigurationDelegate.java:158)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
The text was updated successfully, but these errors were encountered:
When evaluating constant expressions when instantiating if the divider becomes 0 the compilation crashes, even when protected by an if-statement.
Compilation failed, no output written.
/ by zero :: java.lang.ArithmeticException: / by zero
java.lang.ArithmeticException: / by zero
at org.caltoopia.ast2ir.ConstantExpressionEvaluator.caseBinaryExpression(ConstantExpressionEvaluator.java:358)
at org.caltoopia.ir.util.IrReplaceSwitch.caseBinaryExpression(IrReplaceSwitch.java:1)
at org.caltoopia.ir.util.IrSwitch.doSwitch(IrSwitch.java:274)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.caltoopia.ir.util.IrReplaceSwitch.caseProcCall(IrReplaceSwitch.java:572)
at org.caltoopia.ir.util.IrReplaceSwitch.caseProcCall(IrReplaceSwitch.java:1)
at org.caltoopia.ir.util.IrSwitch.doSwitch(IrSwitch.java:377)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.caltoopia.ast2ir.ConstantExpressionEvaluator.caseBlock(ConstantExpressionEvaluator.java:222)
at org.caltoopia.ast2ir.ConstantExpressionEvaluator.caseBlock(ConstantExpressionEvaluator.java:1)
at org.caltoopia.ir.util.IrReplaceSwitch.caseBlock(IrReplaceSwitch.java:1)
at org.caltoopia.ir.util.IrSwitch.doSwitch(IrSwitch.java:409)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.caltoopia.ir.util.IrReplaceSwitch.caseIfStatement(IrReplaceSwitch.java:623)
at org.caltoopia.ir.util.IrReplaceSwitch.caseIfStatement(IrReplaceSwitch.java:1)
at org.caltoopia.ir.util.IrSwitch.doSwitch(IrSwitch.java:401)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.caltoopia.ir.util.IrReplaceSwitch.caseAction(IrReplaceSwitch.java:241)
at org.caltoopia.ast2ir.ConstantExpressionEvaluator.caseAction(ConstantExpressionEvaluator.java:209)
at org.caltoopia.ir.util.IrReplaceSwitch.caseActor(IrReplaceSwitch.java:195)
at org.caltoopia.ir.util.IrReplaceSwitch.caseActor(IrReplaceSwitch.java:1)
at org.caltoopia.ir.util.IrSwitch.doSwitch(IrSwitch.java:137)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.caltoopia.ast2ir.ConstantExpressionEvaluator.evaluate(ConstantExpressionEvaluator.java:180)
at org.caltoopia.ast2ir.Instantiator.instantiate(Instantiator.java:88)
at org.caltoopia.cli.Cal2C.generate(Cal2C.java:352)
at org.caltoopia.frontend.ui.launch.CaltoopiaLaunchConfigurationDelegate.launch(CaltoopiaLaunchConfigurationDelegate.java:158)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
The text was updated successfully, but these errors were encountered: