Changeset 280060 in webkit
- Timestamp:
- Jul 19, 2021, 5:48:54 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r280050 r280060 1 2021-07-19 Mark Lam <mark.lam@apple.com> 2 3 DFG's parseIntResult() should check for negative zero. 4 https://bugs.webkit.org/show_bug.cgi?id=228068 5 rdar://80788603 6 7 Reviewed by Yusuke Suzuki. 8 9 * stress/dfg-parseIntResult-should-check-for-negative-zero.js: Added. 10 1 11 2021-07-19 Yusuke Suzuki <ysuzuki@apple.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r280050 r280060 1 2021-07-19 Mark Lam <mark.lam@apple.com> 2 3 DFG's parseIntResult() should check for negative zero. 4 https://bugs.webkit.org/show_bug.cgi?id=228068 5 rdar://80788603 6 7 Reviewed by Yusuke Suzuki. 8 9 We have to check for negative zero explicitly because C++ evaluates 0.0 == -0.0 10 as true. 11 12 * dfg/DFGOperations.cpp: 13 (JSC::DFG::parseIntResult): 14 1 15 2021-07-19 Yusuke Suzuki <ysuzuki@apple.com> 2 16 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r279910 r280060 203 203 { 204 204 int asInt = static_cast<int>(input); 205 if ( static_cast<double>(asInt) == input)205 if (LIKELY(static_cast<double>(asInt) == input && (asInt || !std::signbit(input)))) 206 206 return JSValue::encode(jsNumber(asInt)); 207 207 return JSValue::encode(jsNumber(input));
Note:
See TracChangeset
for help on using the changeset viewer.