Title: [94930] trunk/Source/_javascript_Core
Revision
94930
Author
[email protected]
Date
2011-09-11 14:45:40 -0700 (Sun, 11 Sep 2011)

Log Message

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.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (94929 => 94930)


--- trunk/Source/_javascript_Core/ChangeLog	2011-09-11 21:11:11 UTC (rev 94929)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-09-11 21:45:40 UTC (rev 94930)
@@ -1,3 +1,22 @@
+2011-09-10  Sam Weinig  <[email protected]>
+
+        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  <[email protected]>
 
         Remove support for anonymous storage from jsobjects

Modified: trunk/Source/_javascript_Core/_javascript_Core.exp (94929 => 94930)


--- trunk/Source/_javascript_Core/_javascript_Core.exp	2011-09-11 21:11:11 UTC (rev 94929)
+++ trunk/Source/_javascript_Core/_javascript_Core.exp	2011-09-11 21:45:40 UTC (rev 94930)
@@ -558,7 +558,6 @@
 __ZNK3JSC19SourceProviderCache8byteSizeEv
 __ZNK3JSC6JSCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
 __ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE
-__ZNK3JSC6JSCell14isGetterSetterEv
 __ZNK3JSC6JSCell8toNumberEPNS_9ExecStateE
 __ZNK3JSC6JSCell8toObjectEPNS_9ExecStateEPNS_14JSGlobalObjectE
 __ZNK3JSC6JSCell8toStringEPNS_9ExecStateE

Modified: trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def (94929 => 94930)


--- trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def	2011-09-11 21:11:11 UTC (rev 94929)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def	2011-09-11 21:45:40 UTC (rev 94930)
@@ -236,7 +236,6 @@
     ?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

Modified: trunk/Source/_javascript_Core/runtime/GetterSetter.cpp (94929 => 94930)


--- trunk/Source/_javascript_Core/runtime/GetterSetter.cpp	2011-09-11 21:11:11 UTC (rev 94929)
+++ trunk/Source/_javascript_Core/runtime/GetterSetter.cpp	2011-09-11 21:45:40 UTC (rev 94930)
@@ -42,9 +42,4 @@
         visitor.append(&m_setter);
 }
 
-bool GetterSetter::isGetterSetter() const
-{
-    return true;
-}
-
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/runtime/GetterSetter.h (94929 => 94930)


--- trunk/Source/_javascript_Core/runtime/GetterSetter.h	2011-09-11 21:11:11 UTC (rev 94929)
+++ trunk/Source/_javascript_Core/runtime/GetterSetter.h	2011-09-11 21:45:40 UTC (rev 94930)
@@ -67,8 +67,6 @@
         static const ClassInfo s_info;
 
     private:
-        virtual bool isGetterSetter() const;
-
         WriteBarrier<JSObject> m_getter;
         WriteBarrier<JSObject> m_setter;  
     };

Modified: trunk/Source/_javascript_Core/runtime/JSCell.cpp (94929 => 94930)


--- trunk/Source/_javascript_Core/runtime/JSCell.cpp	2011-09-11 21:11:11 UTC (rev 94929)
+++ trunk/Source/_javascript_Core/runtime/JSCell.cpp	2011-09-11 21:45:40 UTC (rev 94930)
@@ -117,11 +117,6 @@
     return JSValue();
 }
 
-bool JSCell::isGetterSetter() const
-{
-    return false;
-}
-
 JSValue JSCell::toPrimitive(ExecState*, PreferredPrimitiveType) const
 {
     ASSERT_NOT_REACHED();

Modified: trunk/Source/_javascript_Core/runtime/JSCell.h (94929 => 94930)


--- trunk/Source/_javascript_Core/runtime/JSCell.h	2011-09-11 21:11:11 UTC (rev 94929)
+++ trunk/Source/_javascript_Core/runtime/JSCell.h	2011-09-11 21:45:40 UTC (rev 94930)
@@ -87,7 +87,7 @@
         // 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; }

Modified: trunk/Source/_javascript_Core/runtime/Structure.h (94929 => 94930)


--- trunk/Source/_javascript_Core/runtime/Structure.h	2011-09-11 21:11:11 UTC (rev 94929)
+++ trunk/Source/_javascript_Core/runtime/Structure.h	2011-09-11 21:45:40 UTC (rev 94930)
@@ -312,6 +312,11 @@
         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)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to