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

Changeset 175935 in webkit


Ignore:
Timestamp:
Nov 11, 2014, 8:40:44 AM (12 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r175416 - Make writes to RegExpObject.lastIndex cacheable.
<https://webkit.org/b/138255>

Reviewed by Geoffrey Garen.

We were neglecting to IC the puts to RegExpObject.lastIndex on Octane/regexp,
and ended up spending 4.5% of a time profile in operationPutByIdNonStrict.

~3% progression on Octane/regexp.

  • runtime/RegExpObject.cpp:

(JSC::regExpObjectSetLastIndexStrict):
(JSC::regExpObjectSetLastIndexNonStrict):
(JSC::RegExpObject::put):

Location:
releases/WebKitGTK/webkit-2.6/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.6/Source/JavaScriptCore/ChangeLog

    r175929 r175935  
     12014-10-31  Andreas Kling  <akling@apple.com>
     2
     3        Make writes to RegExpObject.lastIndex cacheable.
     4        <https://webkit.org/b/138255>
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        We were neglecting to IC the puts to RegExpObject.lastIndex on Octane/regexp,
     9        and ended up spending 4.5% of a time profile in operationPutByIdNonStrict.
     10
     11        ~3% progression on Octane/regexp.
     12
     13        * runtime/RegExpObject.cpp:
     14        (JSC::regExpObjectSetLastIndexStrict):
     15        (JSC::regExpObjectSetLastIndexNonStrict):
     16        (JSC::RegExpObject::put):
     17
    1182014-10-30  Andreas Kling  <akling@apple.com>
    219
  • releases/WebKitGTK/webkit-2.6/Source/JavaScriptCore/runtime/RegExpObject.cpp

    r175927 r175935  
    291291}
    292292
     293static void regExpObjectSetLastIndexStrict(ExecState* exec, JSObject* slotBase, EncodedJSValue, EncodedJSValue value)
     294{
     295    asRegExpObject(slotBase)->setLastIndex(exec, JSValue::decode(value), true);
     296}
     297
     298static void regExpObjectSetLastIndexNonStrict(ExecState* exec, JSObject* slotBase, EncodedJSValue, EncodedJSValue value)
     299{
     300    asRegExpObject(slotBase)->setLastIndex(exec, JSValue::decode(value), false);
     301}
     302
    293303void RegExpObject::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
    294304{
    295305    if (propertyName == exec->propertyNames().lastIndex) {
    296306        asRegExpObject(cell)->setLastIndex(exec, value, slot.isStrictMode());
     307        slot.setCustomProperty(asRegExpObject(cell), slot.isStrictMode()
     308            ? regExpObjectSetLastIndexStrict
     309            : regExpObjectSetLastIndexNonStrict);
    297310        return;
    298311    }
Note: See TracChangeset for help on using the changeset viewer.