Title: [197332] releases/WebKitGTK/webkit-2.12/Source/_javascript_Core
Revision
197332
Author
[email protected]
Date
2016-02-29 02:40:59 -0800 (Mon, 29 Feb 2016)

Log Message

Merge r197210 - Reduce direct callers of Structure::findStructuresAndMapForMaterialization
https://bugs.webkit.org/show_bug.cgi?id=154751

Patch by Joseph Pecoraro <[email protected]> on 2016-02-26
Reviewed by Mark Lam.

* runtime/Structure.cpp:
(JSC::Structure::toStructureShape):
This property name iteration is identical to Structure::forEachPropertyConcurrently.
Share the code and reduce callers to the subtle findStructuresAndMapForMaterialization.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog (197331 => 197332)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog	2016-02-29 10:33:41 UTC (rev 197331)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog	2016-02-29 10:40:59 UTC (rev 197332)
@@ -1,3 +1,15 @@
+2016-02-26  Joseph Pecoraro  <[email protected]>
+
+        Reduce direct callers of Structure::findStructuresAndMapForMaterialization
+        https://bugs.webkit.org/show_bug.cgi?id=154751
+
+        Reviewed by Mark Lam.
+
+        * runtime/Structure.cpp:
+        (JSC::Structure::toStructureShape):
+        This property name iteration is identical to Structure::forEachPropertyConcurrently.
+        Share the code and reduce callers to the subtle findStructuresAndMapForMaterialization.
+
 2016-02-26  Keith Miller  <[email protected]>
 
         Folding of OverridesHasInstance DFG nodes shoud happen in constant folding not fixup

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/runtime/Structure.cpp (197331 => 197332)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/runtime/Structure.cpp	2016-02-29 10:33:41 UTC (rev 197331)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/runtime/Structure.cpp	2016-02-29 10:40:59 UTC (rev 197332)
@@ -1153,25 +1153,12 @@
     Structure* curStructure = this;
     JSValue curValue = value;
     while (curStructure) {
-        Vector<Structure*, 8> structures;
-        Structure* structure;
-        PropertyTable* table;
+        curStructure->forEachPropertyConcurrently(
+            [&] (const PropertyMapEntry& entry) -> bool {
+                curShape->addProperty(*entry.key);
+                return true;
+            });
 
-        curStructure->findStructuresAndMapForMaterialization(structures, structure, table);
-        if (table) {
-            PropertyTable::iterator iter = table->begin();
-            PropertyTable::iterator end = table->end();
-            for (; iter != end; ++iter)
-                curShape->addProperty(*iter->key);
-            
-            structure->m_lock.unlock();
-        }
-        for (unsigned i = structures.size(); i--;) {
-            Structure* structure = structures[i];
-            if (structure->m_nameInPrevious)
-                curShape->addProperty(*structure->m_nameInPrevious);
-        }
-
         if (JSObject* curObject = curValue.getObject())
             curShape->setConstructorName(JSObject::calculatedClassName(curObject));
         else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to