Changeset 266254 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Aug 27, 2020, 2:16:01 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r266251 r266254 1 2020-08-27 Saam Barati <[email protected]> 2 3 GetByVal constant folding over a Double OutOfBoundsSaneChain array with no BytecodeUsesAsOther should constant fold to PNaN, not undefined 4 https://bugs.webkit.org/show_bug.cgi?id=215894 5 <rdar://problem/67669696> 6 7 Reviewed by Michael Saboff and Keith Miller. 8 9 GetByVals of the form { OutOfBoundsSaneChain, Double } where there are no 10 BytecodeUsesAsOther return PNaN for holes and OOB accesses, not jsUndefined(). 11 The constant folding for this though was folding to jsUndefined(). I forgot 12 to update that code to constant fold to PNaN when I wrote the OutOfBoundsSaneChain 13 implementation. 14 15 * dfg/DFGAbstractInterpreterInlines.h: 16 (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): 17 1 18 2020-08-27 Keith Miller <[email protected]> 2 19 -
trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
r266223 r266254 2239 2239 m_graph.registerAndWatchStructureTransition(arrayPrototypeStructure); 2240 2240 m_graph.registerAndWatchStructureTransition(objectPrototypeStructure); 2241 // Note that Array::Double and Array::Int32 return JSValue if array mode is OutOfBounds. 2242 setConstant(node, jsUndefined()); 2241 if (node->arrayMode().type() == Array::Double && node->arrayMode().isOutOfBoundsSaneChain() && !(node->flags() & NodeBytecodeUsesAsOther)) 2242 setConstant(node, jsNumber(PNaN)); 2243 else 2244 setConstant(node, jsUndefined()); 2243 2245 return true; 2244 2246 }
Note:
See TracChangeset
for help on using the changeset viewer.