Ignore:
Timestamp:
Jun 11, 2014, 1:16:42 PM (11 years ago)
Author:
[email protected]
Message:

Always inline JSValue::get() and Structure::get().
<https://webkit.org/b/133755>

Reviewed by Ryosuke Niwa.

These functions get really hot, so ask the compiler to be more
aggressive about inlining them.

~28% speed-up on Ryosuke's microbenchmark for accessing nextSibling
through GetByVal.

  • runtime/JSArrayIterator.cpp:
  • runtime/JSCJSValue.cpp:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::get):

  • runtime/JSPromiseDeferred.cpp:
  • runtime/StructureInlines.h:

(JSC::Structure::get):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h

    r169703 r169823  
    666666}
    667667
    668 inline JSValue JSValue::get(ExecState* exec, PropertyName propertyName) const
     668ALWAYS_INLINE JSValue JSValue::get(ExecState* exec, PropertyName propertyName) const
    669669{
    670670    PropertySlot slot(asValue());
     
    672672}
    673673
    674 inline JSValue JSValue::get(ExecState* exec, PropertyName propertyName, PropertySlot& slot) const
     674ALWAYS_INLINE JSValue JSValue::get(ExecState* exec, PropertyName propertyName, PropertySlot& slot) const
    675675{
    676676    // If this is a primitive, we'll need to synthesize the prototype -
Note: See TracChangeset for help on using the changeset viewer.