Changeset 284807 in webkit
- Timestamp:
- Oct 25, 2021, 12:09:56 PM (5 years ago)
- Location:
- branches/safari-612-branch/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGIntegerRangeOptimizationPhase.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612-branch/Source/JavaScriptCore/ChangeLog
r284806 r284807 1 2021-10-25 Null <null@apple.com> 2 3 Cherry-pick r284573. rdar://problem/84329018 4 5 Add missing overflow checks to DFGIntegerRangeOptimizationPhase::isEquivalentTo() 6 https://bugs.webkit.org/show_bug.cgi?id=232024 7 8 Reviewed by Tadeu Zagallo. 9 10 Added overflow check before comparing for equality. 11 12 * dfg/DFGIntegerRangeOptimizationPhase.cpp: 13 14 15 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284573 268f45cc-cd09-0410-ab3c-d52691b4dbfc 16 17 2021-10-20 Michael Saboff <msaboff@apple.com> 18 19 Add missing overflow checks to DFGIntegerRangeOptimizationPhase::isEquivalentTo() 20 https://bugs.webkit.org/show_bug.cgi?id=232024 21 22 Reviewed by Tadeu Zagallo. 23 24 Added overflow check before comparing for equality. 25 26 * dfg/DFGIntegerRangeOptimizationPhase.cpp: 27 1 28 2021-10-25 Null <null@apple.com> 2 29 -
branches/safari-612-branch/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp
r284401 r284807 1 1 /* 2 * Copyright (C) 2015-202 0Apple Inc. All rights reserved.2 * Copyright (C) 2015-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 229 229 return true; 230 230 231 if (m_right->isInt32Constant() && other.m_right->isInt32Constant()) 232 return (m_right->asInt32() + m_offset) == (other.m_right->asInt32() + other.m_offset); 231 if (m_right->isInt32Constant() && other.m_right->isInt32Constant()) { 232 int thisRight = m_right->asInt32(); 233 int otherRight = other.m_right->asInt32(); 234 235 if (sumOverflows<int>(thisRight, m_offset)) 236 return false; 237 if (sumOverflows<int>(otherRight, other.m_offset)) 238 return false; 239 240 return (thisRight + m_offset) == (otherRight + other.m_offset); 241 } 233 242 return false; 234 243 }
Note:
See TracChangeset
for help on using the changeset viewer.