Changeset 218218 in webkit
- Timestamp:
- Jun 13, 2017 3:39:34 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r218216 r218218 1 2017-06-13 Michael Saboff <msaboff@apple.com> 2 3 Refactor AbsenceOfSetter to AbsenceOfSetEffects 4 https://bugs.webkit.org/show_bug.cgi?id=173322 5 6 Reviewed by Filip Pizlo. 7 8 * bytecode/ObjectPropertyCondition.h: 9 (JSC::ObjectPropertyCondition::absenceOfSetEffectWithoutBarrier): 10 (JSC::ObjectPropertyCondition::absenceOfSetEffect): 11 (JSC::ObjectPropertyCondition::absenceOfSetterWithoutBarrier): Deleted. 12 (JSC::ObjectPropertyCondition::absenceOfSetter): Deleted. 13 * bytecode/ObjectPropertyConditionSet.cpp: 14 (JSC::generateConditionsForPropertySetterMiss): 15 (JSC::generateConditionsForPropertySetterMissConcurrently): 16 * bytecode/PropertyCondition.cpp: 17 (JSC::PropertyCondition::dumpInContext): 18 (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint): 19 (JSC::PropertyCondition::isStillValid): 20 (WTF::printInternal): 21 * bytecode/PropertyCondition.h: 22 (JSC::PropertyCondition::absenceOfSetEffectWithoutBarrier): 23 (JSC::PropertyCondition::absenceOfSetEffect): 24 (JSC::PropertyCondition::hasPrototype): 25 (JSC::PropertyCondition::hash): 26 (JSC::PropertyCondition::operator==): 27 (JSC::PropertyCondition::absenceOfSetterWithoutBarrier): Deleted. 28 (JSC::PropertyCondition::absenceOfSetter): Deleted. 29 1 30 2017-06-13 JF Bastien <jfbastien@apple.com> 2 31 -
trunk/Source/JavaScriptCore/bytecode/ObjectPropertyCondition.h
r211247 r218218 89 89 } 90 90 91 static ObjectPropertyCondition absenceOfSet terWithoutBarrier(91 static ObjectPropertyCondition absenceOfSetEffectWithoutBarrier( 92 92 JSObject* object, UniquedStringImpl* uid, JSObject* prototype) 93 93 { 94 94 ObjectPropertyCondition result; 95 95 result.m_object = object; 96 result.m_condition = PropertyCondition::absenceOfSet terWithoutBarrier(uid, prototype);97 return result; 98 } 99 100 static ObjectPropertyCondition absenceOfSet ter(96 result.m_condition = PropertyCondition::absenceOfSetEffectWithoutBarrier(uid, prototype); 97 return result; 98 } 99 100 static ObjectPropertyCondition absenceOfSetEffect( 101 101 VM& vm, JSCell* owner, JSObject* object, UniquedStringImpl* uid, JSObject* prototype) 102 102 { 103 103 if (owner) 104 104 vm.heap.writeBarrier(owner); 105 return absenceOfSet terWithoutBarrier(object, uid, prototype);105 return absenceOfSetEffectWithoutBarrier(object, uid, prototype); 106 106 } 107 107 -
trunk/Source/JavaScriptCore/bytecode/ObjectPropertyConditionSet.cpp
r208637 r218218 207 207 break; 208 208 } 209 case PropertyCondition::AbsenceOfSet ter: {210 result = ObjectPropertyCondition::absenceOfSet ter(209 case PropertyCondition::AbsenceOfSetEffect: { 210 result = ObjectPropertyCondition::absenceOfSetEffect( 211 211 vm, owner, object, uid, object->structure()->storedPrototypeObject()); 212 212 break; … … 334 334 [&] (Vector<ObjectPropertyCondition>& conditions, JSObject* object) -> bool { 335 335 ObjectPropertyCondition result = 336 generateCondition(vm, owner, object, uid, PropertyCondition::AbsenceOfSet ter);336 generateCondition(vm, owner, object, uid, PropertyCondition::AbsenceOfSetEffect); 337 337 if (!result) 338 338 return false; … … 414 414 [&] (Vector<ObjectPropertyCondition>& conditions, JSObject* object) -> bool { 415 415 ObjectPropertyCondition result = 416 generateCondition(vm, nullptr, object, uid, PropertyCondition::AbsenceOfSet ter);416 generateCondition(vm, nullptr, object, uid, PropertyCondition::AbsenceOfSetEffect); 417 417 if (!result) 418 418 return false; -
trunk/Source/JavaScriptCore/bytecode/PropertyCondition.cpp
r218203 r218218 48 48 return; 49 49 case Absence: 50 case AbsenceOfSet ter:50 case AbsenceOfSetEffect: 51 51 out.print(" with prototype ", inContext(JSValue(prototype()), context)); 52 52 return; … … 125 125 } 126 126 127 case AbsenceOfSet ter: {127 case AbsenceOfSetEffect: { 128 128 if (structure->isDictionary()) { 129 129 if (verbose) … … 135 135 PropertyOffset currentOffset = structure->getConcurrently(uid(), currentAttributes); 136 136 if (currentOffset != invalidOffset) { 137 // FIXME: Given the addition of the check for ReadOnly attributes, we should refactor138 // instances of AbsenceOfSetter.139 // https://bugs.webkit.org/show_bug.cgi?id=173322 - Refactor AbsenceOfSetter to something like AbsenceOfSetEffects140 137 if (currentAttributes & (ReadOnly | Accessor | CustomAccessor)) { 141 138 if (verbose) { … … 224 221 // Currently we assume that an impure property can cause a property to appear, and can also 225 222 // "shadow" an existing JS property on the same object. Hence it affects both presence and 226 // absence. It doesn't affect AbsenceOfSet terbecause impure properties aren't ever setters.223 // absence. It doesn't affect AbsenceOfSetEffect because impure properties aren't ever setters. 227 224 switch (m_kind) { 228 225 case Absence: … … 355 352 out.print("Absence"); 356 353 return; 357 case JSC::PropertyCondition::AbsenceOfSet ter:354 case JSC::PropertyCondition::AbsenceOfSetEffect: 358 355 out.print("Absence"); 359 356 return; -
trunk/Source/JavaScriptCore/bytecode/PropertyCondition.h
r211247 r218218 38 38 Presence, 39 39 Absence, 40 AbsenceOfSet ter,40 AbsenceOfSetEffect, 41 41 Equivalence // An adaptive watchpoint on this will be a pair of watchpoints, and when the structure transitions, we will set the replacement watchpoint on the new structure. 42 42 }; … … 90 90 } 91 91 92 static PropertyCondition absenceOfSet terWithoutBarrier(92 static PropertyCondition absenceOfSetEffectWithoutBarrier( 93 93 UniquedStringImpl* uid, JSObject* prototype) 94 94 { 95 95 PropertyCondition result; 96 96 result.m_uid = uid; 97 result.m_kind = AbsenceOfSet ter;97 result.m_kind = AbsenceOfSetEffect; 98 98 result.u.absence.prototype = prototype; 99 99 return result; 100 100 } 101 101 102 static PropertyCondition absenceOfSet ter(102 static PropertyCondition absenceOfSetEffect( 103 103 VM& vm, JSCell* owner, UniquedStringImpl* uid, JSObject* prototype) 104 104 { 105 105 if (owner) 106 106 vm.heap.writeBarrier(owner); 107 return absenceOfSet terWithoutBarrier(uid, prototype);107 return absenceOfSetEffectWithoutBarrier(uid, prototype); 108 108 } 109 109 … … 144 144 } 145 145 146 bool hasPrototype() const { return !!*this && (m_kind == Absence || m_kind == AbsenceOfSet ter); }146 bool hasPrototype() const { return !!*this && (m_kind == Absence || m_kind == AbsenceOfSetEffect); } 147 147 JSObject* prototype() const 148 148 { … … 170 170 break; 171 171 case Absence: 172 case AbsenceOfSet ter:172 case AbsenceOfSetEffect: 173 173 result ^= WTF::PtrHash<JSObject*>::hash(u.absence.prototype); 174 174 break; … … 191 191 && u.presence.attributes == other.u.presence.attributes; 192 192 case Absence: 193 case AbsenceOfSet ter:193 case AbsenceOfSetEffect: 194 194 return u.absence.prototype == other.u.absence.prototype; 195 195 case Equivalence:
Note: See TracChangeset
for help on using the changeset viewer.