Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e936f3ef64041c804fc05bd2ec74e64ca0c46af4
https://github.com/WebKit/WebKit/commit/e936f3ef64041c804fc05bd2ec74e64ca0c46af4
Author: Brenden Forward <[email protected]>
Date: 2025-05-16 (Fri, 16 May 2025)
Changed paths:
A JSTests/stress/operator-valueof.js
M Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
Log Message:
-----------
[JSC] Avoid folding compare operations in DFG involving objects
https://bugs.webkit.org/show_bug.cgi?id=290838
rdar://problem/148813062
Reviewed by Yusuke Suzuki.
We were folding expressions like `a < a` into `false` in DFG even
for object types, which is incorrect in the case that the object
defines a custom `valueOf()` method. Since `valueOf()` is not
checked by `==`, we can still fold those expressions.
* JSTests/stress/operator-valueof.js: Added.
(shouldBe):
(A.prototype.valueOf):
(A):
(lt):
(lte):
(gt):
(gte):
(eq):
(eqq):
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
Canonical link: https://commits.webkit.org/295032@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes