Changeset 240024 in webkit
- Timestamp:
- Jan 15, 2019, 6:17:31 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/string-get-by-val-lowering.js (added)
-
JSTests/stress/type-for-get-by-val-can-be-widen-after-ai.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (modified) (2 diffs)
-
Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp (modified) (2 diffs)
-
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r239982 r240024 1 2019-01-15 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 3 [JSC] Use KnownStringUse for GetByVal(Array::String) since AI would offer wider type information and offer non-string type after removing Check(String) 4 https://bugs.webkit.org/show_bug.cgi?id=193438 5 <rdar://problem/45581249> 6 7 Reviewed by Saam Barati and Keith Miller. 8 9 Under the heavy load (like, compiling WebKit), AI in this code can broaden type information after the 1st run. 10 Then, GetByVal(String) crashed. 11 12 * stress/string-get-by-val-lowering.js: Added. 13 (shouldBe): 14 (test): 15 * stress/type-for-get-by-val-can-be-widen-after-ai.js: Added. 16 (Hello): 17 (foo): 18 1 19 2019-01-15 Tomas Popela <tpopela@redhat.com> 2 20 -
trunk/Source/JavaScriptCore/ChangeLog
r240023 r240024 1 2019-01-15 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 3 [JSC] Use KnownStringUse for GetByVal(Array::String) since AI would offer wider type information and offer non-string type after removing Check(String) 4 https://bugs.webkit.org/show_bug.cgi?id=193438 5 <rdar://problem/45581249> 6 7 Reviewed by Saam Barati and Keith Miller. 8 9 GetByVal(Array::String) emits Check(String) before that. But AI can broaden type constraint in the second run. 10 After the first run removes Check(String), it would happen that AI starts saying the type of 1st child is not String. 11 To claim that it *is* a String type, we should use KnownStringUse here. 12 13 * dfg/DFGFixupPhase.cpp: 14 (JSC::DFG::FixupPhase::fixupNode): StringCharAt and GetByVal(Array::String) share the underlying compiler code. We should 15 change StringUse => KnownStringUse for StringCharAt too. And StringCharAt and StringCharCodeAt potentially have the same 16 problem. This patch fixes it too. 17 * dfg/DFGSSALoweringPhase.cpp: 18 (JSC::DFG::SSALoweringPhase::lowerBoundsCheck): 19 * ftl/FTLLowerDFGToB3.cpp: 20 (JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt): 21 (JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt): 22 1 23 2019-01-15 Saam Barati <sbarati@apple.com> 2 24 -
trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r240023 r240024 782 782 ASSERT(node->arrayMode() == ArrayMode(Array::String, Array::Read)); 783 783 blessArrayOperation(node->child1(), node->child2(), node->child3()); 784 fixEdge<Known CellUse>(node->child1());784 fixEdge<KnownStringUse>(node->child1()); 785 785 fixEdge<Int32Use>(node->child2()); 786 786 break; … … 899 899 break; 900 900 case Array::ForceExit: 901 break; 902 case Array::String: 903 fixEdge<KnownStringUse>(m_graph.varArgChild(node, 0)); 904 fixEdge<Int32Use>(m_graph.varArgChild(node, 1)); 901 905 break; 902 906 default: -
trunk/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp
r230144 r240024 125 125 op = GetVectorLength; 126 126 break; 127 case Array::String: 128 // When we need to support this, it will require additional code since base's useKind is KnownStringUse. 129 DFG_CRASH(m_graph, m_node, "Array::String's base.useKind() is KnownStringUse"); 130 break; 127 131 default: 128 132 break; … … 131 135 Node* length = m_insertionSet.insertNode( 132 136 m_nodeIndex, SpecInt32Only, op, m_node->origin, 133 OpInfo(m_node->arrayMode().asWord()), base, storage);137 OpInfo(m_node->arrayMode().asWord()), Edge(base.node(), KnownCellUse), storage); 134 138 m_insertionSet.insertNode( 135 139 m_nodeIndex, SpecInt32Only, CheckInBounds, m_node->origin, -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r240023 r240024 6591 6591 void compileStringCharAt() 6592 6592 { 6593 LValue base = low Cell(m_graph.child(m_node, 0));6593 LValue base = lowString(m_graph.child(m_node, 0)); 6594 6594 LValue index = lowInt32(m_graph.child(m_node, 1)); 6595 6595 LValue storage = lowStorage(m_graph.child(m_node, 2)); … … 6705 6705 LBasicBlock continuation = m_out.newBlock(); 6706 6706 6707 LValue base = low Cell(m_node->child1());6707 LValue base = lowString(m_node->child1()); 6708 6708 LValue index = lowInt32(m_node->child2()); 6709 6709 LValue storage = lowStorage(m_node->child3());
Note:
See TracChangeset
for help on using the changeset viewer.