Changeset 163755 in webkit
- Timestamp:
- Feb 9, 2014, 1:33:17 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r163752 r163755 1 2014-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 1 19 2014-02-09 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r163517 r163755 279 279 EncodedJSValue JIT_OPERATION operationGetByVal(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty) 280 280 { 281 VM * vm = &exec->vm();282 NativeCallFrameTracer tracer( vm, exec);281 VM& vm = exec->vm(); 282 NativeCallFrameTracer tracer(&vm, exec); 283 283 284 284 JSValue baseValue = JSValue::decode(encodedBase); … … 296 296 return getByVal(exec, base, propertyAsUInt32); 297 297 } 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))) 299 299 return JSValue::encode(result); 300 300 } … … 310 310 EncodedJSValue JIT_OPERATION operationGetByValCell(ExecState* exec, JSCell* base, EncodedJSValue encodedProperty) 311 311 { 312 VM * vm = &exec->vm();313 NativeCallFrameTracer tracer( vm, exec);312 VM& vm = exec->vm(); 313 NativeCallFrameTracer tracer(&vm, exec); 314 314 315 315 JSValue property = JSValue::decode(encodedProperty); … … 323 323 return getByVal(exec, base, propertyAsUInt32); 324 324 } 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))) 326 326 return JSValue::encode(result); 327 327 } -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r163576 r163755 1402 1402 { 1403 1403 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))) 1405 1405 return result; 1406 1406 } -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r163639 r163755 708 708 { 709 709 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))) 711 711 return result; 712 712 } -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r161230 r163755 134 134 bool isZapped() const { return !*reinterpret_cast<uintptr_t* const*>(this); } 135 135 136 JSValue fastGetOwnProperty( ExecState*, const String&);136 JSValue fastGetOwnProperty(VM&, const String&); 137 137 138 138 static ptrdiff_t structureOffset() -
trunk/Source/JavaScriptCore/runtime/JSCellInlines.h
r163225 r163755 172 172 // performing the property map lookup without forming an identifier. We detect this 173 173 // case by checking whether the hash has yet been set for this string. 174 ALWAYS_INLINE JSValue JSCell::fastGetOwnProperty( ExecState* exec, const String& name)174 ALWAYS_INLINE JSValue JSCell::fastGetOwnProperty(VM& vm, const String& name) 175 175 { 176 176 if (!structure()->typeInfo().overridesGetOwnPropertySlot() && !structure()->hasGetterSetterProperties()) { 177 177 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); 180 180 if (offset != invalidOffset) 181 181 return asObject(this)->locationForOffset(offset)->get();
Note:
See TracChangeset
for help on using the changeset viewer.