Make it easier to check if an integer sum would overflow
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Apr 2014 21:13:46 +0000 (21:13 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Apr 2014 21:13:46 +0000 (21:13 +0000)
commit3f8f9a55124e517451762082aa250d9923ba8687
tree970f5a7327af25e247061f093cbb0f857e0541a7
parent51a39db7f223d8be2fa806e526f65592f892a2a4
Make it easier to check if an integer sum would overflow
https://bugs.webkit.org/show_bug.cgi?id=131900

Reviewed by Darin Adler.

Source/JavaScriptCore:
* dfg/DFGOperations.cpp:
* runtime/Operations.h:
(JSC::jsString):

Source/WTF:
* wtf/CheckedArithmetic.h:
(WTF::checkedSum):
(WTF::sumOverflows):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGOperations.cpp
Source/JavaScriptCore/runtime/Operations.h
Source/WTF/ChangeLog
Source/WTF/wtf/CheckedArithmetic.h