Commit 64d86ab9 authored by weinig@apple.com's avatar weinig@apple.com

De-virtualize JSCell::isGetterSetter, type information is available for it

https://bugs.webkit.org/show_bug.cgi?id=67902

Reviewed by Dan Bernstein.

* runtime/GetterSetter.cpp:
* runtime/GetterSetter.h:
Remove override of isGetterSetter.

* runtime/JSCell.cpp:
* runtime/JSCell.h:
De-virtualize and remove silly base implementation.

* runtime/Structure.h:
(JSC::JSCell::isGetterSetter):
Use type info to determine getter-setter-hood.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8c798d2c
2011-09-10 Sam Weinig <sam@webkit.org>
De-virtualize JSCell::isGetterSetter, type information is available for it
https://bugs.webkit.org/show_bug.cgi?id=67902
Reviewed by Dan Bernstein.
* runtime/GetterSetter.cpp:
* runtime/GetterSetter.h:
Remove override of isGetterSetter.
* runtime/JSCell.cpp:
* runtime/JSCell.h:
De-virtualize and remove silly base implementation.
* runtime/Structure.h:
(JSC::JSCell::isGetterSetter):
Use type info to determine getter-setter-hood.
2011-09-09 Oliver Hunt <oliver@apple.com>
Remove support for anonymous storage from jsobjects
......
......@@ -558,7 +558,6 @@ __ZNK3JSC18PropertyDescriptor8writableEv
__ZNK3JSC19SourceProviderCache8byteSizeEv
__ZNK3JSC6JSCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
__ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE
__ZNK3JSC6JSCell14isGetterSetterEv
__ZNK3JSC6JSCell8toNumberEPNS_9ExecStateE
__ZNK3JSC6JSCell8toObjectEPNS_9ExecStateEPNS_14JSGlobalObjectE
__ZNK3JSC6JSCell8toStringEPNS_9ExecStateE
......
......@@ -236,7 +236,6 @@ EXPORTS
?isBusy@Heap@JSC@@QAE_NXZ
?isDataDescriptor@PropertyDescriptor@JSC@@QBE_NXZ
?isDynamicScope@JSGlobalObject@JSC@@UBE_NAA_N@Z
?isGetterSetter@JSCell@JSC@@UBE_NXZ
?isHostFunctionNonInline@JSFunction@JSC@@ABE_NXZ
?isMainThread@WTF@@YA_NXZ
?isReachableFromOpaqueRoots@WeakHandleOwner@JSC@@UAE_NV?$Handle@W4Unknown@JSC@@@2@PAXAAVSlotVisitor@2@@Z
......
......@@ -42,9 +42,4 @@ void GetterSetter::visitChildren(SlotVisitor& visitor)
visitor.append(&m_setter);
}
bool GetterSetter::isGetterSetter() const
{
return true;
}
} // namespace JSC
......@@ -67,8 +67,6 @@ namespace JSC {
static const ClassInfo s_info;
private:
virtual bool isGetterSetter() const;
WriteBarrier<JSObject> m_getter;
WriteBarrier<JSObject> m_setter;
};
......
......@@ -117,11 +117,6 @@ JSValue JSCell::getJSNumber()
return JSValue();
}
bool JSCell::isGetterSetter() const
{
return false;
}
JSValue JSCell::toPrimitive(ExecState*, PreferredPrimitiveType) const
{
ASSERT_NOT_REACHED();
......
......@@ -87,7 +87,7 @@ namespace JSC {
// Querying the type.
bool isString() const;
bool isObject() const;
virtual bool isGetterSetter() const;
bool isGetterSetter() const;
bool inherits(const ClassInfo*) const;
virtual bool isAPIValueWrapper() const { return false; }
virtual bool isPropertyNameIterator() const { return false; }
......
......@@ -312,6 +312,11 @@ namespace JSC {
return m_structure->typeInfo().type() == StringType;
}
inline bool JSCell::isGetterSetter() const
{
return m_structure->typeInfo().type() == GetterSetterType;
}
inline const ClassInfo* JSCell::classInfo() const
{
#if ENABLE(GC_VALIDATION)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment