Changeset 285850 in webkit
- Timestamp:
- Nov 15, 2021, 7:48:45 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/put-by-val-slow-dfg.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp (modified) (8 diffs)
-
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r285817 r285850 1 2021-11-15 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Use operation path when PutByVal child1 is not speculated as a Cell 4 https://bugs.webkit.org/show_bug.cgi?id=233147 5 rdar://85344310 6 7 Reviewed by Mark Lam. 8 9 * stress/put-by-val-slow-dfg.js: Added. 10 (foo): 11 1 12 2021-11-15 Angelos Oikonomopoulos <angelos@igalia.com> 2 13 -
trunk/Source/JavaScriptCore/ChangeLog
r285795 r285850 1 2021-11-15 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Use operation path when PutByVal child1 is not speculated as a Cell 4 https://bugs.webkit.org/show_bug.cgi?id=233147 5 rdar://85344310 6 7 Reviewed by Mark Lam. 8 9 r285530 removed non CellUse / non KnownCellUse case incorrectly (when we do not have Cell edge, 10 then we should use the slow operation path). This patch recovers it. 11 12 * dfg/DFGSpeculativeJIT.cpp: 13 (JSC::DFG::SpeculativeJIT::compilePutByVal): 14 * ftl/FTLLowerDFGToB3.cpp: 15 (JSC::FTL::DFG::LowerDFGToB3::compilePutByVal): 16 1 17 2021-11-14 Yusuke Suzuki <ysuzuki@apple.com> 2 18 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r285636 r285850 2627 2627 { 2628 2628 ArrayMode arrayMode = node->arrayMode().modeForPut(); 2629 Edge child1 = m_jit.graph().varArgChild(node, 0); 2630 Edge child2 = m_jit.graph().varArgChild(node, 1); 2631 Edge child3 = m_jit.graph().varArgChild(node, 2); 2632 Edge child4 = m_jit.graph().varArgChild(node, 3); 2633 2629 2634 switch (arrayMode.type()) { 2630 2635 case Array::AnyTypedArray: … … 2649 2654 case Array::Generic: { 2650 2655 DFG_ASSERT(m_jit.graph(), node, node->op() == PutByVal || node->op() == PutByValDirect, node->op()); 2651 if (m_graph.m_slowPutByVal.contains(node) ) {2652 if ( m_jit.graph().varArgChild(node, 0).useKind() ==CellUse) {2653 if ( m_jit.graph().varArgChild(node, 1).useKind() == StringUse) {2656 if (m_graph.m_slowPutByVal.contains(node) || (child1.useKind() != CellUse && child1.useKind() != KnownCellUse)) { 2657 if (child1.useKind() == CellUse || child1.useKind() == KnownCellUse) { 2658 if (child2.useKind() == StringUse) { 2654 2659 compilePutByValForCellWithString(node); 2655 2660 break; 2656 2661 } 2657 2662 2658 if ( m_jit.graph().varArgChild(node, 1).useKind() == SymbolUse) {2663 if (child2.useKind() == SymbolUse) { 2659 2664 compilePutByValForCellWithSymbol(node); 2660 2665 break; … … 2662 2667 } 2663 2668 2664 JSValueOperand base(this, m_jit.graph().varArgChild(node, 0));2665 JSValueOperand property(this, m_jit.graph().varArgChild(node, 1));2666 JSValueOperand value(this, m_jit.graph().varArgChild(node, 2));2669 JSValueOperand base(this, child1); 2670 JSValueOperand property(this, child2); 2671 JSValueOperand value(this, child3); 2667 2672 JSValueRegs baseRegs = base.jsValueRegs(); 2668 2673 JSValueRegs propertyRegs = property.jsValueRegs(); … … 2680 2685 } 2681 2686 2682 JSValueOperand base(this, m_jit.graph().varArgChild(node, 0), ManualOperandSpeculation);2683 JSValueOperand property(this, m_jit.graph().varArgChild(node, 1), ManualOperandSpeculation);2684 JSValueOperand value(this, m_jit.graph().varArgChild(node, 2), ManualOperandSpeculation);2687 JSValueOperand base(this, child1, ManualOperandSpeculation); 2688 JSValueOperand property(this, child2, ManualOperandSpeculation); 2689 JSValueOperand value(this, child3, ManualOperandSpeculation); 2685 2690 JSValueRegs baseRegs = base.jsValueRegs(); 2686 2691 JSValueRegs propertyRegs = property.jsValueRegs(); … … 2694 2699 } 2695 2700 2696 speculate(node, m_jit.graph().varArgChild(node, 0));2697 speculate(node, m_jit.graph().varArgChild(node, 1));2698 speculate(node, m_jit.graph().varArgChild(node, 2));2701 speculate(node, child1); 2702 speculate(node, child2); 2703 speculate(node, child3); 2699 2704 2700 2705 CodeOrigin codeOrigin = node->origin.semantic; … … 2708 2713 baseRegs, propertyRegs, valueRegs, InvalidGPRReg, stubInfoGPR); 2709 2714 2710 if (m_state.forNode( m_jit.graph().varArgChild(node, 1)).isType(SpecString))2715 if (m_state.forNode(child2).isType(SpecString)) 2711 2716 gen.stubInfo()->propertyIsString = true; 2712 else if (m_state.forNode( m_jit.graph().varArgChild(node, 1)).isType(SpecInt32Only))2717 else if (m_state.forNode(child2).isType(SpecInt32Only)) 2713 2718 gen.stubInfo()->propertyIsInt32 = true; 2714 else if (m_state.forNode( m_jit.graph().varArgChild(node, 1)).isType(SpecSymbol))2719 else if (m_state.forNode(child2).isType(SpecSymbol)) 2715 2720 gen.stubInfo()->propertyIsSymbol = true; 2716 2721 … … 2740 2745 } 2741 2746 case Array::Int32: { 2742 speculateInt32( m_jit.graph().varArgChild(node, 2));2747 speculateInt32(child3); 2743 2748 FALLTHROUGH; 2744 2749 } … … 2753 2758 case Array::ArrayStorage: 2754 2759 case Array::SlowPutArrayStorage: { 2755 SpeculateCellOperand base(this, m_jit.graph().varArgChild(node, 0));2756 SpeculateStrictInt32Operand property(this, m_jit.graph().varArgChild(node, 1));2757 JSValueOperand value(this, m_jit.graph().varArgChild(node, 2));2758 StorageOperand storage(this, m_jit.graph().varArgChild(node, 3));2760 SpeculateCellOperand base(this, child1); 2761 SpeculateStrictInt32Operand property(this, child2); 2762 JSValueOperand value(this, child3); 2763 StorageOperand storage(this, child4); 2759 2764 2760 2765 GPRReg baseReg = base.gpr(); -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r285795 r285850 5721 5721 case Array::Generic: { 5722 5722 if (m_graph.m_slowPutByVal.contains(m_node) || (child1.useKind() != CellUse && child1.useKind() != KnownCellUse)) { 5723 if (child1.useKind() == CellUse ) {5723 if (child1.useKind() == CellUse || child1.useKind() == KnownCellUse) { 5724 5724 V_JITOperation_GCCJ operation = nullptr; 5725 5725 if (child2.useKind() == StringUse) {
Note:
See TracChangeset
for help on using the changeset viewer.