Changeset 252416 in webkit
- Timestamp:
- Nov 13, 2019 10:45:52 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r252385 r252416 1 2019-11-13 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] AI should convert IsCellWithType to constant when Structure set is finite 4 https://bugs.webkit.org/show_bug.cgi?id=204141 5 6 Reviewed by Saam Barati. 7 8 * stress/generator-cell-with-type.js: Added. 9 (shouldBe): 10 (shouldThrow): 11 (test): 12 (i.shouldThrow): 13 1 14 2019-11-12 Yusuke Suzuki <ysuzuki@apple.com> 2 15 -
trunk/Source/JavaScriptCore/ChangeLog
r252390 r252416 1 2019-11-13 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] AI should convert IsCellWithType to constant when Structure set is finite 4 https://bugs.webkit.org/show_bug.cgi?id=204141 5 6 Reviewed by Saam Barati. 7 8 We should fold IsCellWithType if Structure set is finite since we have a chance to know what JSType is. 9 10 * dfg/DFGAbstractInterpreterInlines.h: 11 (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): 12 1 13 2019-11-12 Yusuke Suzuki <ysuzuki@apple.com> 2 14 -
trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
r252374 r252416 1415 1415 default: 1416 1416 constantWasSet = false; 1417 break; 1418 } 1419 if (constantWasSet) 1420 break; 1421 } 1422 1423 if (forNode(node->child1()).m_structure.isFinite()) { 1424 bool constantWasSet = false; 1425 switch (node->op()) { 1426 case IsCellWithType: { 1427 bool ok = true; 1428 Optional<bool> result; 1429 forNode(node->child1()).m_structure.forEach( 1430 [&](RegisteredStructure structure) { 1431 bool matched = structure->typeInfo().type() == node->queriedType(); 1432 if (!result) 1433 result = matched; 1434 else { 1435 if (result.value() != matched) 1436 ok = false; 1437 } 1438 }); 1439 if (ok && result) { 1440 setConstant(node, jsBoolean(result.value())); 1441 constantWasSet = true; 1442 } 1443 break; 1444 } 1445 default: 1417 1446 break; 1418 1447 }
Note: See TracChangeset
for help on using the changeset viewer.