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

Changeset 236249 in webkit


Ignore:
Timestamp:
Sep 20, 2018, 12:54:16 AM (8 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r236223 - AI rule for MultiPutByOffset executes its effects in the wrong order
​https://bugs.webkit.org/show_bug.cgi?id=189757
<rdar://problem/43535257>

Reviewed by Michael Saboff.

JSTests:

  • stress/multi-put-by-offset-must-filter-value-before-filtering-base.js: Added.

(foo):
(Foo):
(g):

Source/JavaScriptCore:

The AI rule for MultiPutByOffset was executing effects in the wrong order.
It first executed the transition effects and the effects on the base, and
then executed the filtering effects on the value being stored. However, you
can end up with the wrong type when the base and the value being stored
are the same. E.g, in a program like o.f = o. These effects need to happen
in the opposite order, modeling what happens in the runtime executing of
MultiPutByOffset.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

Location:
releases/WebKitGTK/webkit-2.22
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.22/JSTests/ChangeLog

    r236198 r236249  
     12018-09-19  Saam barati  <sbarati@apple.com>
     2
     3        AI rule for MultiPutByOffset executes its effects in the wrong order
     4        https://bugs.webkit.org/show_bug.cgi?id=189757
     5        <rdar://problem/43535257>
     6
     7        Reviewed by Michael Saboff.
     8
     9        * stress/multi-put-by-offset-must-filter-value-before-filtering-base.js: Added.
     10        (foo):
     11        (Foo):
     12        (g):
     13
    1142018-09-17  Saam barati  <sbarati@apple.com>
    215
  • releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore/ChangeLog

    r236198 r236249  
     12018-09-19  Saam barati  <sbarati@apple.com>
     2
     3        AI rule for MultiPutByOffset executes its effects in the wrong order
     4        https://bugs.webkit.org/show_bug.cgi?id=189757
     5        <rdar://problem/43535257>
     6
     7        Reviewed by Michael Saboff.
     8
     9        The AI rule for MultiPutByOffset was executing effects in the wrong order.
     10        It first executed the transition effects and the effects on the base, and
     11        then executed the filtering effects on the value being stored. However, you
     12        can end up with the wrong type when the base and the value being stored
     13        are the same. E.g, in a program like `o.f = o`. These effects need to happen
     14        in the opposite order, modeling what happens in the runtime executing of
     15        MultiPutByOffset.
     16
     17        * dfg/DFGAbstractInterpreterInlines.h:
     18        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
     19
    1202018-09-17  Saam barati  <sbarati@apple.com>
    221
  • releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h

    r236177 r236249  
    33003300        }
    33013301       
     3302        // We need to order AI executing these effects in the same order as they're executed
     3303        // at runtime. This is critical when you have JS code like `o.f = o;`. We first
     3304        // filter types on o, then transition o. Not the other way around. If we got
     3305        // this ordering wrong, we could end up with the wrong type representing o.
     3306        setForNode(node->child2(), resultingValue);
     3307        if (!!originalValue && !resultingValue)
     3308            m_state.setIsValid(false);
     3309
    33023310        observeTransitions(clobberLimit, transitions);
    33033311        if (forNode(node->child1()).changeStructure(m_graph, newSet) == Contradiction)
    3304             m_state.setIsValid(false);
    3305         setForNode(node->child2(), resultingValue);
    3306         if (!!originalValue && !resultingValue)
    33073312            m_state.setIsValid(false);
    33083313        break;
Note: See TracChangeset for help on using the changeset viewer.