Commit 90329da
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- rhino/src/main/java/org/mozilla/javascript
- tools
- compat-table
7 files changed
+4159
-144
lines changedLarge diffs are not rendered by default.
Lines changed: 260 additions & 144 deletions
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments