Changeset 225844 in webkit
- Timestamp:
- Dec 13, 2017 9:19:24 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r225834 r225844 1 2017-12-13 Saam Barati <sbarati@apple.com> 2 3 TypeCheckHoistingPhase needs to emit a CheckStructureOrEmpty if it's doing it for |this| 4 https://bugs.webkit.org/show_bug.cgi?id=180734 5 <rdar://problem/35640547> 6 7 Reviewed by Yusuke Suzuki. 8 9 * stress/type-check-hoisting-phase-hoist-check-structure-on-tdz-this-value.js: Added. 10 (__isPropertyOfType): 11 (__getProperties): 12 (__getObjects): 13 (__getRandomObject): 14 (theClass.): 15 (theClass): 16 (childClass): 17 (counter.catch): 18 1 19 2017-12-12 Saam Barati <sbarati@apple.com> 2 20 -
trunk/Source/JavaScriptCore/ChangeLog
r225840 r225844 1 2017-12-13 Saam Barati <sbarati@apple.com> 2 3 TypeCheckHoistingPhase needs to emit a CheckStructureOrEmpty if it's doing it for |this| 4 https://bugs.webkit.org/show_bug.cgi?id=180734 5 <rdar://problem/35640547> 6 7 Reviewed by Yusuke Suzuki. 8 9 The |this| value may be TDZ. If type check hoisting phase 10 hoists a CheckStructure to it, it will crash. This patch 11 makes it so we emit CheckStructureOrEmpty for |this|. 12 13 * dfg/DFGTypeCheckHoistingPhase.cpp: 14 (JSC::DFG::TypeCheckHoistingPhase::run): 15 1 16 2017-12-12 Yusuke Suzuki <utatane.tea@gmail.com> 2 17 -
trunk/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp
r225307 r225844 145 145 OpInfo(variable), Edge(node)); 146 146 if (iter->value.m_structure) { 147 auto checkOp = CheckStructure; 148 VirtualRegister local = node->variableAccessData()->local(); 149 auto* inlineCallFrame = node->origin.semantic.inlineCallFrame; 150 if ((local - (inlineCallFrame ? inlineCallFrame->stackOffset : 0)) == virtualRegisterForArgument(0)) { 151 // |this| can be the TDZ value. The call entrypoint won't have |this| as TDZ, 152 // but a catch or a loop OSR entry may have |this| be TDZ. 153 checkOp = CheckStructureOrEmpty; 154 } 155 147 156 insertionSet.insertNode( 148 indexInBlock + 1, SpecNone, CheckStructure, origin,157 indexInBlock + 1, SpecNone, checkOp, origin, 149 158 OpInfo(m_graph.addStructureSet(iter->value.m_structure)), 150 159 Edge(getLocal, CellUse));
Note: See TracChangeset
for help on using the changeset viewer.