Changeset 242568 in webkit
- Timestamp:
- Mar 6, 2019, 2:34:30 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/make-rope-should-not-propagate-constant-folded-value-in-ai.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r242519 r242568 1 2019-03-06 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] AI should not propagate AbstractValue relying on constant folding phase 4 https://bugs.webkit.org/show_bug.cgi?id=195375 5 6 Reviewed by Saam Barati. 7 8 * stress/make-rope-should-not-propagate-constant-folded-value-in-ai.js: Added. 9 (let.array): 10 1 11 2019-03-05 Saam barati <sbarati@apple.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r242519 r242568 1 2019-03-06 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] AI should not propagate AbstractValue relying on constant folding phase 4 https://bugs.webkit.org/show_bug.cgi?id=195375 5 6 Reviewed by Saam Barati. 7 8 MakeRope rule in AI attempts to propagate the node, which will be produced after constant folding phase runs. 9 This is wrong since we do not guarantee that constant folding phase runs after AI runs (e.g. DFGSpeculativeJIT 10 and FTLLowerDFGToB3 run AI). This results in the bug that the value produced at runtime is different from the 11 proven constant value in AI. In the attached test, AI says the value is SpecStringIdent while the resulted value 12 at runtime is SpecStringVar, resulting in wrong MakeRope code. This patch removes the path propagating the node 13 relying on constant folding phase. 14 15 * dfg/DFGAbstractInterpreterInlines.h: 16 (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): 17 1 18 2019-03-05 Saam barati <sbarati@apple.com> 2 19 -
trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
r241228 r242568 734 734 } 735 735 736 if (numberOfRemovedChildren) {736 if (numberOfRemovedChildren) 737 737 m_state.setFoundConstants(true); 738 if (numberOfRemovedChildren == numberOfChildren) {739 // Propagate the last child. This is the way taken in the constant folding phase.740 setForNode(node, forNode(node->children.child(numberOfChildren - 1)));741 break;742 }743 if ((numberOfRemovedChildren + 1) == numberOfChildren) {744 ASSERT(nonEmptyIndex);745 setForNode(node, forNode(node->children.child(nonEmptyIndex.value())));746 break;747 }748 }749 738 setForNode(node, m_vm.stringStructure.get()); 750 739 break;
Note:
See TracChangeset
for help on using the changeset viewer.