Title: [185380] trunk/Source/_javascript_Core
- Revision
- 185380
- Author
- [email protected]
- Date
- 2015-06-09 14:21:16 -0700 (Tue, 09 Jun 2015)
Log Message
[JSC] JSPropertyNameEnumerator's property name vector should be sized-to-fit.
<https://webkit.org/b/145787>
Reviewed by Darin Adler.
Saw 108 kB worth of JSPropertyNameEnumerator backing store Vectors on cnet.com.
Use Vector::resizeToFit() since we know the perfect size up front.
* runtime/JSPropertyNameEnumerator.cpp:
(JSC::JSPropertyNameEnumerator::finishCreation):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (185379 => 185380)
--- trunk/Source/_javascript_Core/ChangeLog 2015-06-09 21:20:08 UTC (rev 185379)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-06-09 21:21:16 UTC (rev 185380)
@@ -1,5 +1,18 @@
2015-06-09 Andreas Kling <[email protected]>
+ [JSC] JSPropertyNameEnumerator's property name vector should be sized-to-fit.
+ <https://webkit.org/b/145787>
+
+ Reviewed by Darin Adler.
+
+ Saw 108 kB worth of JSPropertyNameEnumerator backing store Vectors on cnet.com.
+ Use Vector::resizeToFit() since we know the perfect size up front.
+
+ * runtime/JSPropertyNameEnumerator.cpp:
+ (JSC::JSPropertyNameEnumerator::finishCreation):
+
+2015-06-09 Andreas Kling <[email protected]>
+
FunctionExecutable::isCompiling() is weird and wrong.
<https://webkit.org/b/145689>
Modified: trunk/Source/_javascript_Core/runtime/JSPropertyNameEnumerator.cpp (185379 => 185380)
--- trunk/Source/_javascript_Core/runtime/JSPropertyNameEnumerator.cpp 2015-06-09 21:20:08 UTC (rev 185379)
+++ trunk/Source/_javascript_Core/runtime/JSPropertyNameEnumerator.cpp 2015-06-09 21:21:16 UTC (rev 185380)
@@ -70,7 +70,7 @@
m_endStructurePropertyIndex = endStructurePropertyIndex;
m_endGenericPropertyIndex = vector.size();
- m_propertyNames.resize(vector.size());
+ m_propertyNames.resizeToFit(vector.size());
for (unsigned i = 0; i < vector.size(); ++i) {
const Identifier& identifier = vector[i];
m_propertyNames[i].set(vm, this, jsString(&vm, identifier.string()));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes