Changeset 163755 in webkit


Ignore:
Timestamp:
Feb 9, 2014, 1:33:17 PM (12 years ago)
Author:
akling@apple.com
Message:

Pass VM instead of ExecState to JSCell::fastGetOwnProperty().
<https://webkit.org/b/128497>

Knocks off a couple of instructions.

Reviewed by Anders Carlsson.

  • dfg/DFGOperations.cpp:
  • jit/JITOperations.cpp:

(JSC::getByVal):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::getByVal):

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::fastGetOwnProperty):

Location:
trunk/Source/JavaScriptCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r163752 r163755  
     12014-02-09  Andreas Kling  <akling@apple.com>
     2
     3        Pass VM instead of ExecState to JSCell::fastGetOwnProperty().
     4        <https://webkit.org/b/128497>
     5
     6        Knocks off a couple of instructions.
     7
     8        Reviewed by Anders Carlsson.
     9
     10        * dfg/DFGOperations.cpp:
     11        * jit/JITOperations.cpp:
     12        (JSC::getByVal):
     13        * llint/LLIntSlowPaths.cpp:
     14        (JSC::LLInt::getByVal):
     15        * runtime/JSCell.h:
     16        * runtime/JSCellInlines.h:
     17        (JSC::JSCell::fastGetOwnProperty):
     18
    1192014-02-09  Anders Carlsson  <andersca@apple.com>
    220
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r163517 r163755  
    279279EncodedJSValue JIT_OPERATION operationGetByVal(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty)
    280280{
    281     VM* vm = &exec->vm();
    282     NativeCallFrameTracer tracer(vm, exec);
     281    VM& vm = exec->vm();
     282    NativeCallFrameTracer tracer(&vm, exec);
    283283   
    284284    JSValue baseValue = JSValue::decode(encodedBase);
     
    296296                return getByVal(exec, base, propertyAsUInt32);
    297297        } else if (property.isString()) {
    298             if (JSValue result = base->fastGetOwnProperty(exec, asString(property)->value(exec)))
     298            if (JSValue result = base->fastGetOwnProperty(vm, asString(property)->value(exec)))
    299299                return JSValue::encode(result);
    300300        }
     
    310310EncodedJSValue JIT_OPERATION operationGetByValCell(ExecState* exec, JSCell* base, EncodedJSValue encodedProperty)
    311311{
    312     VM* vm = &exec->vm();
    313     NativeCallFrameTracer tracer(vm, exec);
     312    VM& vm = exec->vm();
     313    NativeCallFrameTracer tracer(&vm, exec);
    314314   
    315315    JSValue property = JSValue::decode(encodedProperty);
     
    323323            return getByVal(exec, base, propertyAsUInt32);
    324324    } else if (property.isString()) {
    325         if (JSValue result = base->fastGetOwnProperty(exec, asString(property)->value(exec)))
     325        if (JSValue result = base->fastGetOwnProperty(vm, asString(property)->value(exec)))
    326326            return JSValue::encode(result);
    327327    }
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r163576 r163755  
    14021402{
    14031403    if (LIKELY(baseValue.isCell() && subscript.isString())) {
    1404         if (JSValue result = baseValue.asCell()->fastGetOwnProperty(exec, asString(subscript)->value(exec)))
     1404        if (JSValue result = baseValue.asCell()->fastGetOwnProperty(exec->vm(), asString(subscript)->value(exec)))
    14051405            return result;
    14061406    }
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r163639 r163755  
    708708{
    709709    if (LIKELY(baseValue.isCell() && subscript.isString())) {
    710         if (JSValue result = baseValue.asCell()->fastGetOwnProperty(exec, asString(subscript)->value(exec)))
     710        if (JSValue result = baseValue.asCell()->fastGetOwnProperty(exec->vm(), asString(subscript)->value(exec)))
    711711            return result;
    712712    }
  • trunk/Source/JavaScriptCore/runtime/JSCell.h

    r161230 r163755  
    134134    bool isZapped() const { return !*reinterpret_cast<uintptr_t* const*>(this); }
    135135
    136     JSValue fastGetOwnProperty(ExecState*, const String&);
     136    JSValue fastGetOwnProperty(VM&, const String&);
    137137
    138138    static ptrdiff_t structureOffset()
  • trunk/Source/JavaScriptCore/runtime/JSCellInlines.h

    r163225 r163755  
    172172// performing the property map lookup without forming an identifier. We detect this
    173173// case by checking whether the hash has yet been set for this string.
    174 ALWAYS_INLINE JSValue JSCell::fastGetOwnProperty(ExecState* exec, const String& name)
     174ALWAYS_INLINE JSValue JSCell::fastGetOwnProperty(VM& vm, const String& name)
    175175{
    176176    if (!structure()->typeInfo().overridesGetOwnPropertySlot() && !structure()->hasGetterSetterProperties()) {
    177177        PropertyOffset offset = name.impl()->hasHash()
    178             ? structure()->get(exec->vm(), Identifier(exec, name))
    179             : structure()->get(exec->vm(), name);
     178            ? structure()->get(vm, Identifier(&vm, name))
     179            : structure()->get(vm, name);
    180180        if (offset != invalidOffset)
    181181            return asObject(this)->locationForOffset(offset)->get();
Note: See TracChangeset for help on using the changeset viewer.