+2014-03-01 Andreas Kling <akling@apple.com>
+
+ JSCell::fastGetOwnProperty() should get the Structure more efficiently.
+ <https://webkit.org/b/129560>
+
+ Now that structure() is nontrivial and we have a faster structure(VM&),
+ make use of that in fastGetOwnProperty() since we already have VM.
+
+ Reviewed by Sam Weinig.
+
+ * runtime/JSCellInlines.h:
+ (JSC::JSCell::fastGetOwnProperty):
+
2014-03-01 Andreas Kling <akling@apple.com>
Avoid going through ExecState for VM when we already have it (in some places.)
// case by checking whether the hash has yet been set for this string.
ALWAYS_INLINE JSValue JSCell::fastGetOwnProperty(VM& vm, const String& name)
{
- if (!structure()->typeInfo().overridesGetOwnPropertySlot() && !structure()->hasGetterSetterProperties()) {
+ Structure& structure = *this->structure(vm);
+ if (!structure.typeInfo().overridesGetOwnPropertySlot() && !structure.hasGetterSetterProperties()) {
PropertyOffset offset = name.impl()->hasHash()
- ? structure()->get(vm, Identifier(&vm, name))
- : structure()->get(vm, name);
+ ? structure.get(vm, Identifier(&vm, name))
+ : structure.get(vm, name);
if (offset != invalidOffset)
return asObject(this)->locationForOffset(offset)->get();
}