Changeset 262252 in webkit for trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
- Timestamp:
- May 28, 2020, 11:38:48 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r262233 r262252 1590 1590 compileNumberToStringWithValidRadixConstant(); 1591 1591 break; 1592 case Check SubClass:1593 compileCheck SubClass();1592 case CheckJSCast: 1593 compileCheckJSCast(); 1594 1594 break; 1595 1595 case CallDOM: … … 13940 13940 } 13941 13941 13942 void compileCheck SubClass()13942 void compileCheckJSCast() 13943 13943 { 13944 13944 LValue cell = lowCell(m_node->child1()); 13945 13945 13946 13946 const ClassInfo* classInfo = m_node->classInfo(); 13947 13948 if (classInfo->inheritsJSTypeRange) { 13949 LValue hasType = isCellWithType(cell, classInfo->inheritsJSTypeRange.value(), speculationFromClassInfoInheritance(classInfo)); 13950 speculate(BadType, jsValueValue(cell), m_node->child1().node(), m_out.bitNot(hasType)); 13951 return; 13952 } 13953 13947 13954 if (!classInfo->checkSubClassSnippet) { 13948 13955 LBasicBlock loop = m_out.newBlock(); … … 17709 17716 } 17710 17717 17711 LValue isCellWithType(LValue cell, JSType queriedType, Optional<SpeculatedType> speculatedTypeForQuery, SpeculatedType type = SpecFullTop)17718 LValue isCellWithType(LValue cell, JSTypeRange queriedTypeRange, Optional<SpeculatedType> speculatedTypeForQuery, SpeculatedType type = SpecFullTop) 17712 17719 { 17713 17720 if (speculatedTypeForQuery) { … … 17715 17722 return proven; 17716 17723 } 17717 return m_out.equal( 17724 if (queriedTypeRange.first == queriedTypeRange.last) { 17725 return m_out.equal( 17726 m_out.load8ZeroExt32(cell, m_heaps.JSCell_typeInfoType), 17727 m_out.constInt32(queriedTypeRange.first)); 17728 } 17729 17730 ASSERT(queriedTypeRange.last > queriedTypeRange.first); 17731 LValue first = m_out.sub( 17718 17732 m_out.load8ZeroExt32(cell, m_heaps.JSCell_typeInfoType), 17719 m_out.constInt32(queriedType)); 17733 m_out.constInt32(queriedTypeRange.first)); 17734 return m_out.belowOrEqual(first, m_out.constInt32(queriedTypeRange.last - queriedTypeRange.first)); 17735 } 17736 17737 LValue isCellWithType(LValue cell, JSType queriedType, Optional<SpeculatedType> speculatedTypeForQuery, SpeculatedType type = SpecFullTop) 17738 { 17739 return isCellWithType(cell, JSTypeRange { queriedType, queriedType }, speculatedTypeForQuery, type); 17720 17740 } 17721 17741 17722 17742 LValue isTypedArrayView(LValue cell, SpeculatedType type = SpecFullTop) 17723 17743 { 17724 if (LValue proven = isProvenValue(type & SpecCell, SpecTypedArrayView)) 17725 return proven; 17726 LValue jsType = m_out.sub( 17727 m_out.load8ZeroExt32(cell, m_heaps.JSCell_typeInfoType), 17728 m_out.constInt32(FirstTypedArrayType)); 17729 return m_out.below( 17730 jsType, 17731 m_out.constInt32(NumberOfTypedArrayTypesExcludingDataView)); 17744 return isCellWithType(cell, JSTypeRange { static_cast<JSType>(FirstTypedArrayType), static_cast<JSType>(LastTypedArrayTypeExcludingDataView) }, SpecTypedArrayView, type); 17732 17745 } 17733 17746
Note:
See TracChangeset
for help on using the changeset viewer.