⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 201610 in webkit


Ignore:
Timestamp:
Jun 2, 2016, 12:36:59 PM (10 years ago)
Author:
keith_miller@apple.com
Message:

ObjectPropertyCondition should have a isStillValidAssumingImpurePropertyWatchpoint function
https://bugs.webkit.org/show_bug.cgi?id=158308

Reviewed by Filip Pizlo.

Recently, structureEnsuresValidityAssumingImpurePropertyWatchpoint was converted to check
what should be isStillValidAssumingImpurePropertyWatchpoint. This patch fixes the API so
it should work as expected. This patch also changes generateConditions in
ObjectPropertyConditionSet to use isStillValidAssumingImpurePropertyWatchpoint.

  • bytecode/ObjectPropertyCondition.cpp:

(JSC::ObjectPropertyCondition::structureEnsuresValidityAssumingImpurePropertyWatchpoint):
(JSC::ObjectPropertyCondition::isStillValidAssumingImpurePropertyWatchpoint):

  • bytecode/ObjectPropertyCondition.h:
  • bytecode/ObjectPropertyConditionSet.cpp:
Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r201609 r201610  
     12016-06-02  Keith Miller  <keith_miller@apple.com>
     2
     3        ObjectPropertyCondition should have a isStillValidAssumingImpurePropertyWatchpoint function
     4        https://bugs.webkit.org/show_bug.cgi?id=158308
     5
     6        Reviewed by Filip Pizlo.
     7
     8        Recently, structureEnsuresValidityAssumingImpurePropertyWatchpoint was converted to check
     9        what should be isStillValidAssumingImpurePropertyWatchpoint. This patch fixes the API so
     10        it should work as expected. This patch also changes generateConditions in
     11        ObjectPropertyConditionSet to use isStillValidAssumingImpurePropertyWatchpoint.
     12
     13        * bytecode/ObjectPropertyCondition.cpp:
     14        (JSC::ObjectPropertyCondition::structureEnsuresValidityAssumingImpurePropertyWatchpoint):
     15        (JSC::ObjectPropertyCondition::isStillValidAssumingImpurePropertyWatchpoint):
     16        * bytecode/ObjectPropertyCondition.h:
     17        * bytecode/ObjectPropertyConditionSet.cpp:
     18
    1192016-06-02  Filip Pizlo  <fpizlo@apple.com>
    220
  • trunk/Source/JavaScriptCore/bytecode/ObjectPropertyCondition.cpp

    r201584 r201610  
    5050    Structure* structure) const
    5151{
    52     return m_condition.isStillValidAssumingImpurePropertyWatchpoint(structure, m_object);
     52    return m_condition.isStillValidAssumingImpurePropertyWatchpoint(structure);
    5353}
    5454
     
    7373    return validityRequiresImpurePropertyWatchpoint(m_object->structure());
    7474}
     75
     76bool ObjectPropertyCondition::isStillValidAssumingImpurePropertyWatchpoint(Structure* structure) const
     77{
     78    return m_condition.isStillValidAssumingImpurePropertyWatchpoint(structure, m_object);
     79}
     80
     81bool ObjectPropertyCondition::isStillValidAssumingImpurePropertyWatchpoint() const
     82{
     83    if (!*this)
     84        return false;
     85
     86    return isStillValidAssumingImpurePropertyWatchpoint(m_object->structure());
     87}
     88
    7589
    7690bool ObjectPropertyCondition::isStillValid(Structure* structure) const
  • trunk/Source/JavaScriptCore/bytecode/ObjectPropertyCondition.h

    r196446 r201610  
    187187    bool validityRequiresImpurePropertyWatchpoint() const;
    188188
     189    // Checks if the condition still holds setting aside the need for an impure property watchpoint.
     190    // Validity might still require watchpoints on the object.
     191    bool isStillValidAssumingImpurePropertyWatchpoint(Structure*) const;
     192    bool isStillValidAssumingImpurePropertyWatchpoint() const;
     193
    189194    // Checks if the condition still holds. May conservatively return false, if the object and
    190195    // structure alone don't guarantee the condition. Note that this may return true if the
  • trunk/Source/JavaScriptCore/bytecode/ObjectPropertyConditionSet.cpp

    r201584 r201610  
    214214    }
    215215
    216     if (!result.structureEnsuresValidityAssumingImpurePropertyWatchpoint()) {
     216    if (!result.isStillValidAssumingImpurePropertyWatchpoint()) {
    217217        if (verbose)
    218218            dataLog("Failed to create condition: ", result, "\n");
Note: See TracChangeset for help on using the changeset viewer.