Changeset 244480 in webkit
- Timestamp:
- Apr 19, 2019 5:37:43 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r244429 r244480 1 2019-04-19 Saam Barati <sbarati@apple.com> 2 3 AbstractValue can represent more than int52 4 https://bugs.webkit.org/show_bug.cgi?id=197118 5 <rdar://problem/49969960> 6 7 Reviewed by Michael Saboff. 8 9 * stress/abstract-value-can-include-int52.js: Added. 10 (foo): 11 (index.index.8.index.60.index.65.index.1234.index.1234.parseInt.string_appeared_here.String.fromCharCode): 12 1 13 2019-04-18 Yusuke Suzuki <ysuzuki@apple.com> 2 14 -
trunk/Source/JavaScriptCore/ChangeLog
r244470 r244480 1 2019-04-19 Saam Barati <sbarati@apple.com> 2 3 AbstractValue can represent more than int52 4 https://bugs.webkit.org/show_bug.cgi?id=197118 5 <rdar://problem/49969960> 6 7 Reviewed by Michael Saboff. 8 9 Let's analyze this control flow diamond: 10 11 #0 12 branch #1, #2 13 14 #1: 15 PutStack(JSValue, loc42) 16 Jump #3 17 18 #2: 19 PutStack(Int52, loc42) 20 Jump #3 21 22 #3: 23 ... 24 25 Our abstract value for loc42 at the head of #3 will contain an abstract 26 value that us the union of Int52 with other things. Obviously in the 27 above program, a GetStack for loc42 would be inavlid, since it might 28 be loading either JSValue or Int52. However, the abstract interpreter 29 just tracks what the value could be, and it could be Int52 or JSValue. 30 31 When I did the Int52 refactoring, I expected such things to never happen, 32 but it turns out it does. We should just allow for this instead of asserting 33 against it since it's valid IR to do the above. 34 35 * bytecode/SpeculatedType.cpp: 36 (JSC::dumpSpeculation): 37 * dfg/DFGAbstractValue.cpp: 38 (JSC::DFG::AbstractValue::checkConsistency const): 39 * dfg/DFGAbstractValue.h: 40 (JSC::DFG::AbstractValue::validateTypeAcceptingBoxedInt52 const): 41 1 42 2019-04-19 Tadeu Zagallo <tzagallo@apple.com> 2 43 -
trunk/Source/JavaScriptCore/bytecode/SpeculatedType.cpp
r244079 r244480 249 249 isTop = false; 250 250 } 251 252 if (value & SpecInt32AsInt52) 253 strOut.print("Int32AsInt52"); 254 255 if (value & SpecNonInt32AsInt52) 256 strOut.print("NonInt32AsInt52"); 257 251 258 252 if ((value & SpecBytecodeDouble) == SpecBytecodeDouble) 259 253 strOut.print("BytecodeDouble"); … … 288 282 isTop = false; 289 283 290 if (isTop) 284 if (value & SpecEmpty) 285 strOut.print("Empty"); 286 else 287 isTop = false; 288 289 if (value & SpecInt52Any) { 290 if ((value & SpecInt52Any) == SpecInt52Any) 291 strOut.print("Int52Any"); 292 else if (value & SpecInt32AsInt52) 293 strOut.print("Int32AsInt52"); 294 else if (value & SpecNonInt32AsInt52) 295 strOut.print("NonInt32AsInt52"); 296 } else 297 isTop = false; 298 299 if (value == SpecBytecodeTop) 300 out.print("BytecodeTop"); 301 else if (value == SpecHeapTop) 302 out.print("HeapTop"); 303 else if (value == SpecFullTop) 304 out.print("FullTop"); 305 else if (isTop) 291 306 out.print("Top"); 292 307 else 293 308 out.print(strStream.toCString()); 294 295 if (value & SpecEmpty)296 out.print("Empty");297 309 } 298 310 -
trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp
r244287 r244480 453 453 RELEASE_ASSERT(!m_value); 454 454 455 if (m_type & SpecInt52Any) {456 if (m_type != SpecFullTop)457 RELEASE_ASSERT(isAnyInt52Speculation(m_type));458 }459 460 455 if (!!m_value) 461 456 RELEASE_ASSERT(validateTypeAcceptingBoxedInt52(m_value)); -
trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.h
r244287 r244480 527 527 528 528 if (m_type & SpecInt52Any) { 529 ASSERT(!(m_type & ~SpecInt52Any)); 530 531 if (mergeSpeculations(m_type, int52AwareSpeculationFromValue(value)) != m_type) 532 return false; 533 return true; 529 if (mergeSpeculations(m_type, int52AwareSpeculationFromValue(value)) == m_type) 530 return true; 534 531 } 535 532
Note: See TracChangeset
for help on using the changeset viewer.