Changeset 246210 in webkit
- Timestamp:
- Jun 7, 2019 11:54:31 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r246139 r246210 1 2019-06-07 Tadeu Zagallo <tzagallo@apple.com> 2 3 AI should get GetterSetter structure from the base's GlobalObject for GetGetterSetterByOffset 4 https://bugs.webkit.org/show_bug.cgi?id=198581 5 <rdar://problem/51099753> 6 7 Reviewed by Saam Barati. 8 9 * stress/global-object-proto-getter.js: Added. 10 (f): 11 (test): 12 1 13 2019-06-05 Justin Michaud <justin_michaud@apple.com> 2 14 -
trunk/Source/JavaScriptCore/ChangeLog
r246177 r246210 1 2019-06-07 Tadeu Zagallo <tzagallo@apple.com> 2 3 AI should get GetterSetter structure from the base's GlobalObject for GetGetterSetterByOffset 4 https://bugs.webkit.org/show_bug.cgi?id=198581 5 <rdar://problem/51099753> 6 7 Reviewed by Saam Barati. 8 9 For GetGetterSetterByOffset, when the abstract interpreter fails to read the property 10 from the object, it gets the GetterSetter structure from the CodeBlock's global object. 11 However, that's not correct, since the global object for the base object might differ 12 from the CodeBlock's. Instead, we try to get the global object from the base, when it's 13 a constant object. Otherwise, we can't infer the value and only set the type. 14 15 * dfg/DFGAbstractInterpreterInlines.h: 16 (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): 17 1 18 2019-06-06 Devin Rousso <drousso@apple.com> 2 19 -
trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
r246073 r246210 3317 3317 case GetGetterSetterByOffset: { 3318 3318 StorageAccessData& data = node->storageAccessData(); 3319 JSValue result = m_graph.tryGetConstantProperty(forNode(node->child2()), data.offset); 3319 AbstractValue base = forNode(node->child2()); 3320 JSValue result = m_graph.tryGetConstantProperty(base, data.offset); 3320 3321 if (result && jsDynamicCast<GetterSetter*>(m_vm, result)) { 3321 3322 setConstant(node, *m_graph.freeze(result)); … … 3323 3324 } 3324 3325 3325 setForNode(node, m_graph.globalObjectFor(node->origin.semantic)->getterSetterStructure()); 3326 if (base.value() && base.value().isObject()) { 3327 setForNode(node, asObject(base.value())->globalObject()->getterSetterStructure()); 3328 break; 3329 } 3330 3331 setTypeForNode(node, SpecObjectOther); 3326 3332 break; 3327 3333 }
Note: See TracChangeset
for help on using the changeset viewer.