Title: [165164] trunk/Source/_javascript_Core
Revision
165164
Author
[email protected]
Date
2014-03-05 19:20:37 -0800 (Wed, 05 Mar 2014)

Log Message

JSObject::fastGetOwnPropertySlot does a slow check for OverridesGetOwnPropertySlot
https://bugs.webkit.org/show_bug.cgi?id=129754

Reviewed by Geoffrey Garen.

InlineTypeFlags are stored in JSCell, so we can just load those instead of going through the TypeInfo.

* runtime/JSCell.h:
(JSC::JSCell::inlineTypeFlags):
* runtime/JSObject.h:
(JSC::JSObject::fastGetOwnPropertySlot):
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::TypeInfo):
(JSC::TypeInfo::overridesGetOwnPropertySlot):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (165163 => 165164)


--- trunk/Source/_javascript_Core/ChangeLog	2014-03-06 03:19:49 UTC (rev 165163)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-03-06 03:20:37 UTC (rev 165164)
@@ -1,3 +1,20 @@
+2014-03-05  Mark Hahnenberg  <[email protected]>
+
+        JSObject::fastGetOwnPropertySlot does a slow check for OverridesGetOwnPropertySlot
+        https://bugs.webkit.org/show_bug.cgi?id=129754
+
+        Reviewed by Geoffrey Garen.
+
+        InlineTypeFlags are stored in JSCell, so we can just load those instead of going through the TypeInfo.
+
+        * runtime/JSCell.h:
+        (JSC::JSCell::inlineTypeFlags):
+        * runtime/JSObject.h:
+        (JSC::JSObject::fastGetOwnPropertySlot):
+        * runtime/JSTypeInfo.h:
+        (JSC::TypeInfo::TypeInfo):
+        (JSC::TypeInfo::overridesGetOwnPropertySlot):
+
 2014-03-05  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: ASSERTION FAILED: m_javaScriptBreakpoints.isEmpty()

Modified: trunk/Source/_javascript_Core/runtime/JSCell.h (165163 => 165164)


--- trunk/Source/_javascript_Core/runtime/JSCell.h	2014-03-06 03:19:49 UTC (rev 165163)
+++ trunk/Source/_javascript_Core/runtime/JSCell.h	2014-03-06 03:20:37 UTC (rev 165164)
@@ -102,6 +102,8 @@
     void setStructure(VM&, Structure*);
     void clearStructure() { m_structureID = 0; }
 
+    TypeInfo::InlineTypeFlags inlineTypeFlags() const { return m_flags; }
+
     const char* className();
 
     // Extracting the value.

Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (165163 => 165164)


--- trunk/Source/_javascript_Core/runtime/JSObject.h	2014-03-06 03:19:49 UTC (rev 165163)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h	2014-03-06 03:20:37 UTC (rev 165164)
@@ -1233,7 +1233,7 @@
 
 ALWAYS_INLINE bool JSObject::fastGetOwnPropertySlot(ExecState* exec, VM& vm, Structure& structure, PropertyName propertyName, PropertySlot& slot)
 {
-    if (!structure.typeInfo().overridesGetOwnPropertySlot())
+    if (!TypeInfo::overridesGetOwnPropertySlot(inlineTypeFlags()))
         return asObject(this)->inlineGetOwnPropertySlot(exec, vm, structure, propertyName, slot);
     return structure.classInfo()->methodTable.getOwnPropertySlot(this, exec, propertyName, slot);
 }

Modified: trunk/Source/_javascript_Core/runtime/JSTypeInfo.h (165163 => 165164)


--- trunk/Source/_javascript_Core/runtime/JSTypeInfo.h	2014-03-06 03:19:49 UTC (rev 165163)
+++ trunk/Source/_javascript_Core/runtime/JSTypeInfo.h	2014-03-06 03:20:37 UTC (rev 165164)
@@ -67,7 +67,7 @@
             , m_flags(inlineTypeFlags)
             , m_flags2(outOfLineTypeFlags)
         {
-            ASSERT(m_type >= CompoundType || !(m_flags & OverridesVisitChildren));
+            ASSERT(m_type >= CompoundType || !(isSetOnFlags1(OverridesVisitChildren)));
             // No object that doesn't ImplementsHasInstance should override it!
             ASSERT((m_flags & (ImplementsHasInstance | OverridesHasInstance)) != OverridesHasInstance);
             // ImplementsDefaultHasInstance means (ImplementsHasInstance & !OverridesHasInstance)
@@ -88,7 +88,8 @@
         bool isEnvironmentRecord() const { return isSetOnFlags1(IsEnvironmentRecord); }
         bool overridesHasInstance() const { return isSetOnFlags1(OverridesHasInstance); }
         bool implementsDefaultHasInstance() const { return isSetOnFlags1(ImplementsDefaultHasInstance); }
-        bool overridesGetOwnPropertySlot() const { return isSetOnFlags1(OverridesGetOwnPropertySlot); }
+        bool overridesGetOwnPropertySlot() const { return overridesGetOwnPropertySlot(inlineTypeFlags()); }
+        static bool overridesGetOwnPropertySlot(InlineTypeFlags flags) { return flags & OverridesGetOwnPropertySlot; }
         bool interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero() const { return isSetOnFlags1(InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero); }
         bool overridesVisitChildren() const { return isSetOnFlags1(OverridesVisitChildren); }
         bool overridesGetPropertyNames() const { return isSetOnFlags2(OverridesGetPropertyNames); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to