Changeset 262083 in webkit for trunk/Source/JavaScriptCore/ftl
- Timestamp:
- May 22, 2020, 3:31:13 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore/ftl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp
r261600 r262083 281 281 case HasGenericProperty: 282 282 case HasStructureProperty: 283 case InStructureProperty: 283 284 case HasIndexedProperty: 284 285 case GetDirectPname: -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r261755 r262083 1478 1478 compileHasStructureProperty(); 1479 1479 break; 1480 case InStructureProperty: 1481 compileInStructureProperty(); 1482 break; 1480 1483 case GetDirectPname: 1481 1484 compileGetDirectPname(); … … 12242 12245 } 12243 12246 12244 void compileHasStructureProperty() 12247 template <typename SlowPathCall> 12248 void compileHasStructurePropertyImpl(LValue base, SlowPathCall slowPathCall) 12245 12249 { 12246 12250 JSGlobalObject* globalObject = m_graph.globalObjectFor(m_node->origin.semantic); 12247 LValue base = lowJSValue(m_node->child1());12248 12251 LValue property = lowString(m_node->child2()); 12249 12252 LValue enumerator = lowCell(m_node->child3()); 12250 12253 12254 LBasicBlock isCellCase = m_out.newBlock(); 12251 12255 LBasicBlock correctStructure = m_out.newBlock(); 12252 LBasicBlock wrongStructure= m_out.newBlock();12256 LBasicBlock slowPath = m_out.newBlock(); 12253 12257 LBasicBlock continuation = m_out.newBlock(); 12258 12259 m_out.branch(isCell(base, provenType(m_node->child1())), 12260 usually(isCellCase), rarely(slowPath)); 12261 12262 LBasicBlock lastNext = m_out.appendTo(isCellCase, correctStructure); 12254 12263 12255 12264 m_out.branch(m_out.notEqual( 12256 12265 m_out.load32(base, m_heaps.JSCell_structureID), 12257 12266 m_out.load32(enumerator, m_heaps.JSPropertyNameEnumerator_cachedStructureID)), 12258 rarely( wrongStructure), usually(correctStructure));12259 12260 LBasicBlock lastNext = m_out.appendTo(correctStructure, wrongStructure);12267 rarely(slowPath), usually(correctStructure)); 12268 12269 m_out.appendTo(correctStructure, slowPath); 12261 12270 ValueFromBlock correctStructureResult = m_out.anchor(m_out.booleanTrue); 12262 12271 m_out.jump(continuation); 12263 12272 12264 m_out.appendTo( wrongStructure, continuation);12265 ValueFromBlock wrongStructureResult = m_out.anchor(12273 m_out.appendTo(slowPath, continuation); 12274 ValueFromBlock slowPathResult = m_out.anchor( 12266 12275 m_out.equal( 12267 12276 m_out.constInt64(JSValue::encode(jsBoolean(true))), 12268 vmCall(Int64, operationHasGenericProperty, weakPointer(globalObject), base, property)));12277 vmCall(Int64, slowPathCall, weakPointer(globalObject), base, property))); 12269 12278 m_out.jump(continuation); 12270 12279 12271 12280 m_out.appendTo(continuation, lastNext); 12272 setBoolean(m_out.phi(Int32, correctStructureResult, wrongStructureResult)); 12281 setBoolean(m_out.phi(Int32, correctStructureResult, slowPathResult)); 12282 } 12283 12284 void compileHasStructureProperty() 12285 { 12286 compileHasStructurePropertyImpl(lowJSValue(m_node->child1()), operationHasGenericProperty); 12287 } 12288 12289 void compileInStructureProperty() 12290 { 12291 compileHasStructurePropertyImpl(lowCell(m_node->child1()), operationInStructureProperty); 12273 12292 } 12274 12293
Note:
See TracChangeset
for help on using the changeset viewer.