Changeset 254188 in webkit
- Timestamp:
- Jan 7, 2020, 11:23:30 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/ai-value-div-should-result-in-constant-int-where-possible.js (added)
-
JSTests/stress/ai-value-mod-should-result-in-constant-int-where-possible.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r254088 r254188 1 2020-01-07 Saam Barati <sbarati@apple.com> 2 3 AI rule for ValueMod/ValueDiv produce constants with the wrong format when the result can be an int32 4 https://bugs.webkit.org/show_bug.cgi?id=205906 5 <rdar://problem/56108519> 6 7 Reviewed by Yusuke Suzuki. 8 9 * stress/ai-value-div-should-result-in-constant-int-where-possible.js: Added. 10 (foo.bar.f): 11 (foo.): 12 (foo): 13 * stress/ai-value-mod-should-result-in-constant-int-where-possible.js: Added. 14 (foo.bar.f): 15 (foo.): 16 (foo): 17 1 18 2020-01-06 Alexey Shvayka <shvaikalesh@gmail.com> 2 19 -
trunk/Source/JavaScriptCore/ChangeLog
r254187 r254188 1 2020-01-07 Saam Barati <sbarati@apple.com> 2 3 AI rule for ValueMod/ValueDiv produce constants with the wrong format when the result can be an int32 4 https://bugs.webkit.org/show_bug.cgi?id=205906 5 <rdar://problem/56108519> 6 7 Reviewed by Yusuke Suzuki. 8 9 The runtime code for ValueMod and ValueDiv produces an int32 when the result 10 is of int32 value. However, the AI was saying the result is in double format. 11 This patch fixes AI to produce a JSValue in the right format. 12 13 * dfg/DFGAbstractInterpreterInlines.h: 14 (JSC::DFG::AbstractInterpreter<AbstractStateType>::handleConstantDivOp): 15 1 16 2020-01-07 Said Abou-Hallawa <sabouhallawa@apple.com> 2 17 -
trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
r254087 r254188 324 324 didFoldClobberWorld(); 325 325 326 if (isDivOperation) 327 setConstant(node, jsDoubleNumber(left.asNumber() / right.asNumber())); 328 else 329 setConstant(node, jsDoubleNumber(fmod(left.asNumber(), right.asNumber()))); 326 if (isDivOperation) { 327 if (op == ValueDiv) 328 setConstant(node, jsNumber(left.asNumber() / right.asNumber())); 329 else 330 setConstant(node, jsDoubleNumber(left.asNumber() / right.asNumber())); 331 } else { 332 if (op == ValueMod) 333 setConstant(node, jsNumber(fmod(left.asNumber(), right.asNumber()))); 334 else 335 setConstant(node, jsDoubleNumber(fmod(left.asNumber(), right.asNumber()))); 336 } 330 337 331 338 return true;
Note:
See TracChangeset
for help on using the changeset viewer.