Skip to content

Commit 90329da

Browse files
committed
Refactor Math.sumPrecise to follow Hermes unified iterator approach
- Unified iterator approach for both arrays and iterables (addresses aardvark179's review) - Enhanced overflow handling with biased partials tracking - Improved special value handling for -0, infinities, and NaN - Extracted common algorithm into sumPreciseFromIterable helper method - Added TwoSum inner class for cleaner two-sum algorithm implementation - Better edge case handling for MAX_DOUBLE boundaries This refactoring eliminates code duplication between array-like and iterable paths by using a single iterator-based approach, similar to the Hermes implementation pattern.
1 parent a3837db commit 90329da

File tree

7 files changed

+4159
-144
lines changed

7 files changed

+4159
-144
lines changed

rhino-feature-matrix.html

Lines changed: 262 additions & 0 deletions
Large diffs are not rendered by default.

rhino/src/main/java/org/mozilla/javascript/NativeMath.java

Lines changed: 260 additions & 144 deletions
Large diffs are not rendered by default.

test262-compat-features.html

Lines changed: 527 additions & 0 deletions
Large diffs are not rendered by default.

test262-full-results.html

Lines changed: 1271 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit a970fc00cc33b58d0b84d4b290ea46a185c8fcf1

0 commit comments

Comments
 (0)