0.4% of PLT3 in JSCell::structure() below JSObject::visitChildren().
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 May 2014 18:26:17 +0000 (18:26 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 May 2014 18:26:17 +0000 (18:26 +0000)
<https://webkit.org/b/132828>
<rdar://problem/16886285>

Reviewed by Michael Saboff.

* runtime/JSObject.cpp:
(JSC::JSObject::visitButterfly):
(JSC::JSObject::visitChildren):

    Use JSCell::structure(VM&) to reduce the number of hoops we jump
    through to find Structures during marking.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168631 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSObject.cpp

index 8a1319a..da2fef8 100644 (file)
@@ -1,3 +1,18 @@
+2014-05-12  Andreas Kling  <akling@apple.com>
+
+        0.4% of PLT3 in JSCell::structure() below JSObject::visitChildren().
+        <https://webkit.org/b/132828>
+        <rdar://problem/16886285>
+
+        Reviewed by Michael Saboff.
+
+        * runtime/JSObject.cpp:
+        (JSC::JSObject::visitButterfly):
+        (JSC::JSObject::visitChildren):
+
+            Use JSCell::structure(VM&) to reduce the number of hoops we jump
+            through to find Structures during marking.
+
 2014-05-12  László Langó  <llango.u-szeged@partner.samsung.com>
 
         [cmake] Add missing FTL source files to the build system.
index 87efa81..4d88109 100644 (file)
@@ -165,7 +165,7 @@ ALWAYS_INLINE void JSObject::visitButterfly(SlotVisitor& visitor, Butterfly* but
 {
     ASSERT(butterfly);
     
-    Structure* structure = this->structure();
+    Structure* structure = this->structure(visitor.vm());
     
     size_t propertyCapacity = structure->outOfLineCapacity();
     size_t preCapacity;
@@ -214,7 +214,7 @@ void JSObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 
     Butterfly* butterfly = thisObject->butterfly();
     if (butterfly)
-        thisObject->visitButterfly(visitor, butterfly, thisObject->structure()->outOfLineSize());
+        thisObject->visitButterfly(visitor, butterfly, thisObject->structure(visitor.vm())->outOfLineSize());
 
 #if !ASSERT_DISABLED
     visitor.m_isCheckingForDefaultMarkViolation = wasCheckingForDefaultMarkViolation;