Changeset 259598 in webkit
- Timestamp:
- Apr 6, 2020, 3:47:10 PM (6 years ago)
- Location:
- branches/safari-609.2.1.2-branch/Source/JavaScriptCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGArrayMode.cpp (modified) (3 diffs)
-
dfg/DFGArrayMode.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-609.2.1.2-branch/Source/JavaScriptCore/ChangeLog
r259502 r259598 1 2020-04-06 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r259264. rdar://problem/61352437 4 5 [JSC] DFGArrayMode::alreadyChecked should have NonArray check when ArrayMode is NonArray+SlowPutArrayStorage 6 https://bugs.webkit.org/show_bug.cgi?id=209791 7 8 Reviewed by Saam Barati. 9 10 DFGArrayMode::alreadyChecked with NonArray+SlowPutArrayStorage should check NonArray condition. 11 12 * dfg/DFGArrayMode.cpp: 13 (JSC::DFG::ArrayMode::alreadyChecked const): 14 * dfg/DFGArrayMode.h: 15 (JSC::DFG::ArrayMode::arrayModesWithIndexingShapes const): 16 17 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259264 268f45cc-cd09-0410-ab3c-d52691b4dbfc 18 19 2020-03-30 Yusuke Suzuki <ysuzuki@apple.com> 20 21 [JSC] DFGArrayMode::alreadyChecked should have NonArray check when ArrayMode is NonArray+SlowPutArrayStorage 22 https://bugs.webkit.org/show_bug.cgi?id=209791 23 24 Reviewed by Saam Barati. 25 26 DFGArrayMode::alreadyChecked with NonArray+SlowPutArrayStorage should check NonArray condition. 27 28 * dfg/DFGArrayMode.cpp: 29 (JSC::DFG::ArrayMode::alreadyChecked const): 30 * dfg/DFGArrayMode.h: 31 (JSC::DFG::ArrayMode::arrayModesWithIndexingShapes const): 32 1 33 2020-04-03 Alan Coon <alancoon@apple.com> 2 34 -
branches/safari-609.2.1.2-branch/Source/JavaScriptCore/dfg/DFGArrayMode.cpp
r250086 r259598 511 511 case Array::SlowPutArrayStorage: 512 512 switch (arrayClass()) { 513 case Array::OriginalArray: { 513 case Array::OriginalArray: 514 case Array::OriginalCopyOnWriteArray: { 514 515 CRASH(); 515 516 return false; … … 530 531 return true; 531 532 } 532 533 default: { 533 534 // Array::OriginalNonArray can be shown when the value is a TypedArray with original structure. 535 // But here, we already filtered TypedArrays. So, just handle it like a NonArray. 536 case Array::NonArray: 537 case Array::OriginalNonArray: { 538 if (arrayModesAlreadyChecked(value.m_arrayModes, asArrayModesIgnoringTypedArrays(NonArrayWithArrayStorage) | asArrayModesIgnoringTypedArrays(NonArrayWithSlowPutArrayStorage))) 539 return true; 540 if (value.m_structure.isTop()) 541 return false; 542 for (unsigned i = value.m_structure.size(); i--;) { 543 RegisteredStructure structure = value.m_structure[i]; 544 if (!hasAnyArrayStorage(structure->indexingType())) 545 return false; 546 if (structure->indexingType() & IsArray) 547 return false; 548 } 549 return true; 550 } 551 552 case Array::PossiblyArray: { 534 553 if (arrayModesAlreadyChecked(value.m_arrayModes, asArrayModesIgnoringTypedArrays(NonArrayWithArrayStorage) | asArrayModesIgnoringTypedArrays(ArrayWithArrayStorage) | asArrayModesIgnoringTypedArrays(NonArrayWithSlowPutArrayStorage) | asArrayModesIgnoringTypedArrays(ArrayWithSlowPutArrayStorage))) 535 554 return true; … … 542 561 } 543 562 return true; 544 } } 563 } 564 } 545 565 546 566 case Array::DirectArguments: -
branches/safari-609.2.1.2-branch/Source/JavaScriptCore/dfg/DFGArrayMode.h
r249959 r259598 532 532 return asArrayModesIgnoringTypedArrays(shape) | asArrayModesIgnoringTypedArrays(shape | IsArray) | asArrayModesIgnoringTypedArrays(shape | IsArray | CopyOnWrite); 533 533 return asArrayModesIgnoringTypedArrays(shape) | asArrayModesIgnoringTypedArrays(shape | IsArray); 534 default: 535 // This is only necessary for C++ compilers that don't understand enums. 536 return 0; 537 } 534 } 535 // This is only necessary for C++ compilers that don't understand enums. 536 return 0; 538 537 } 539 538
Note:
See TracChangeset
for help on using the changeset viewer.