Changeset 190682 in webkit


Ignore:
Timestamp:
Oct 7, 2015 1:27:46 PM (9 years ago)
Author:
fpizlo@apple.com
Message:

Don't setOutOfBounds in JIT code for PutByVal, since the C++ slow path already does it
https://bugs.webkit.org/show_bug.cgi?id=149885

Reviewed by Geoffrey Garen.

This simplifies the slow path code, which will make it easier to put read barriers on all of
the butterflies.

  • jit/JITOperations.cpp:

(JSC::getByVal):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitSlow_op_put_by_val):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r190681 r190682  
     12015-10-07  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Don't setOutOfBounds in JIT code for PutByVal, since the C++ slow path already does it
     4        https://bugs.webkit.org/show_bug.cgi?id=149885
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        This simplifies the slow path code, which will make it easier to put read barriers on all of
     9        the butterflies.
     10
     11        * jit/JITOperations.cpp:
     12        (JSC::getByVal):
     13        * jit/JITPropertyAccess.cpp:
     14        (JSC::JIT::emitSlow_op_put_by_val):
     15
    1162015-10-07  Filip Pizlo  <fpizlo@apple.com>
    217
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r190606 r190682  
    402402                object->setIndexQuickly(callFrame->vm(), i, value);
    403403            else {
     404                // FIXME: This will make us think that in-bounds typed array accesses are actually
     405                // out-of-bounds.
     406                // https://bugs.webkit.org/show_bug.cgi?id=149886
    404407                byValInfo->arrayProfile->setOutOfBounds();
    405408                object->methodTable(vm)->putByIndex(object, callFrame, i, value, callFrame->codeBlock()->isStrictMode());
     
    435438        }
    436439
     440        // FIXME: This will make us think that in-bounds typed array accesses are actually
     441        // out-of-bounds.
     442        // https://bugs.webkit.org/show_bug.cgi?id=149886
    437443        byValInfo->arrayProfile->setOutOfBounds();
    438444        baseObject->putDirectIndex(callFrame, index, value, 0, isStrictMode ? PutDirectIndexShouldThrow : PutDirectIndexShouldNotThrow);
     
    15891595                return object->getIndexQuickly(i);
    15901596
    1591             if (!canAccessArgumentIndexQuickly(*object, i))
     1597            if (!canAccessArgumentIndexQuickly(*object, i)) {
     1598                // FIXME: This will make us think that in-bounds typed array accesses are actually
     1599                // out-of-bounds.
     1600                // https://bugs.webkit.org/show_bug.cgi?id=149886
    15921601                byValInfo->arrayProfile->setOutOfBounds();
     1602            }
    15931603        }
    15941604
     
    17511761        return JSValue::encode(JSValue(JSValue::JSTrue));
    17521762
    1753     if (!canAccessArgumentIndexQuickly(*object, index))
     1763    if (!canAccessArgumentIndexQuickly(*object, index)) {
     1764        // FIXME: This will make us think that in-bounds typed array accesses are actually
     1765        // out-of-bounds.
     1766        // https://bugs.webkit.org/show_bug.cgi?id=149886
    17541767        byValInfo->arrayProfile->setOutOfBounds();
     1768    }
    17551769    return JSValue::encode(jsBoolean(object->hasProperty(exec, index)));
    17561770}
     
    17711785        return JSValue::encode(JSValue(JSValue::JSTrue));
    17721786
    1773     if (!canAccessArgumentIndexQuickly(*object, index))
     1787    if (!canAccessArgumentIndexQuickly(*object, index)) {
     1788        // FIXME: This will make us think that in-bounds typed array accesses are actually
     1789        // out-of-bounds.
     1790        // https://bugs.webkit.org/show_bug.cgi?id=149886
    17741791        byValInfo->arrayProfile->setOutOfBounds();
     1792    }
    17751793    return JSValue::encode(jsBoolean(object->hasProperty(exec, subscript.asUInt32())));
    17761794}
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r190681 r190682  
    449449    linkSlowCase(iter); // base not array check
    450450   
     451    linkSlowCase(iter); // out of bounds
     452
    451453    JITArrayMode mode = chooseArrayMode(profile);
    452454    switch (mode) {
     
    458460        break;
    459461    }
    460    
    461     Jump skipProfiling = jump();
    462     linkSlowCase(iter); // out of bounds
    463     emitArrayProfileOutOfBoundsSpecialCase(profile);
    464     skipProfiling.link(this);
    465462   
    466463    Label slowPath = label();
Note: See TracChangeset for help on using the changeset viewer.