Repository: flex-falcon
Updated Branches:
  refs/heads/develop 16297c334 -> 7121b45a9


make it clear you are not dividing by zero


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/7121b45a
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/7121b45a
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/7121b45a

Branch: refs/heads/develop
Commit: 7121b45a93588041bf6e099f33be448a4e3a5770
Parents: 16297c3
Author: Justin Mclean <jmcl...@apache.org>
Authored: Sun Jun 11 12:29:48 2017 +1000
Committer: Justin Mclean <jmcl...@apache.org>
Committed: Sun Jun 11 12:29:48 2017 +1000

----------------------------------------------------------------------
 .../flex/compiler/internal/as/codegen/ABCGeneratingReducer.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7121b45a/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/ABCGeneratingReducer.java
----------------------------------------------------------------------
diff --git 
a/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/ABCGeneratingReducer.java
 
b/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/ABCGeneratingReducer.java
index 776993f..c712f56 100644
--- 
a/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/ABCGeneratingReducer.java
+++ 
b/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/ABCGeneratingReducer.java
@@ -749,7 +749,7 @@ public class ABCGeneratingReducer
                 // java treats -0 and 0 as equal, but divide by -0 results in 
NEG INFINITY, whereas pos
                 // 0 results in POS INFINITY
                 // positive 0 can be encoded with a pushbyte, but neg zero 
requires a pushdouble
-                if( dval == 0 && 1/dval == Double.NEGATIVE_INFINITY )
+                if( dval == 0.0 && 1.0/dval == Double.NEGATIVE_INFINITY )
                     result_list.addInstruction(OP_pushdouble, dval);
                 else
                     // Integer

Reply via email to