Changeset 259264 in webkit
- Timestamp:
- Mar 30, 2020, 6:46:55 PM (6 years ago)
- Location:
- trunk/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
-
trunk/Source/JavaScriptCore/ChangeLog
r259262 r259264 1 2020-03-30 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] DFGArrayMode::alreadyChecked should have NonArray check when ArrayMode is NonArray+SlowPutArrayStorage 4 https://bugs.webkit.org/show_bug.cgi?id=209791 5 6 Reviewed by Saam Barati. 7 8 DFGArrayMode::alreadyChecked with NonArray+SlowPutArrayStorage should check NonArray condition. 9 10 * dfg/DFGArrayMode.cpp: 11 (JSC::DFG::ArrayMode::alreadyChecked const): 12 * dfg/DFGArrayMode.h: 13 (JSC::DFG::ArrayMode::arrayModesWithIndexingShapes const): 14 1 15 2020-03-30 Alexey Shvayka <shvaikalesh@gmail.com> 2 16 -
trunk/Source/JavaScriptCore/dfg/DFGArrayMode.cpp
r259175 r259264 512 512 case Array::SlowPutArrayStorage: 513 513 switch (arrayClass()) { 514 case Array::OriginalArray: { 514 case Array::OriginalArray: 515 case Array::OriginalCopyOnWriteArray: { 515 516 CRASH(); 516 517 return false; … … 531 532 return true; 532 533 } 533 534 default: { 534 535 // Array::OriginalNonArray can be shown when the value is a TypedArray with original structure. 536 // But here, we already filtered TypedArrays. So, just handle it like a NonArray. 537 case Array::NonArray: 538 case Array::OriginalNonArray: { 539 if (arrayModesAlreadyChecked(value.m_arrayModes, asArrayModesIgnoringTypedArrays(NonArrayWithArrayStorage) | asArrayModesIgnoringTypedArrays(NonArrayWithSlowPutArrayStorage))) 540 return true; 541 if (value.m_structure.isTop()) 542 return false; 543 for (unsigned i = value.m_structure.size(); i--;) { 544 RegisteredStructure structure = value.m_structure[i]; 545 if (!hasAnyArrayStorage(structure->indexingType())) 546 return false; 547 if (structure->indexingType() & IsArray) 548 return false; 549 } 550 return true; 551 } 552 553 case Array::PossiblyArray: { 535 554 if (arrayModesAlreadyChecked(value.m_arrayModes, asArrayModesIgnoringTypedArrays(NonArrayWithArrayStorage) | asArrayModesIgnoringTypedArrays(ArrayWithArrayStorage) | asArrayModesIgnoringTypedArrays(NonArrayWithSlowPutArrayStorage) | asArrayModesIgnoringTypedArrays(ArrayWithSlowPutArrayStorage))) 536 555 return true; … … 543 562 } 544 563 return true; 545 } } 564 } 565 } 546 566 547 567 case Array::DirectArguments: -
trunk/Source/JavaScriptCore/dfg/DFGArrayMode.h
r249959 r259264 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.