Title: [234434] trunk/Source/_javascript_Core
- Revision
- 234434
- Author
- [email protected]
- Date
- 2018-07-31 11:48:44 -0700 (Tue, 31 Jul 2018)
Log Message
[JSC] Remove unnecessary cellLock() in JSObject's GC marking if IndexingType is contiguous
https://bugs.webkit.org/show_bug.cgi?id=188201
Reviewed by Keith Miller.
We do not reuse the existing butterfly with Contiguous shape for new ArrayStorage butterfly.
When converting the butterfly with Contiguous shape to ArrayStorage, we always allocate a
new one. So this cellLock() is unnecessary for contiguous shape since contigous shaped butterfly
never becomes broken state. This patch removes unnecessary locking.
* runtime/JSObject.cpp:
(JSC::JSObject::visitButterflyImpl):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (234433 => 234434)
--- trunk/Source/_javascript_Core/ChangeLog 2018-07-31 18:37:18 UTC (rev 234433)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-07-31 18:48:44 UTC (rev 234434)
@@ -1,3 +1,18 @@
+2018-07-31 Yusuke Suzuki <[email protected]>
+
+ [JSC] Remove unnecessary cellLock() in JSObject's GC marking if IndexingType is contiguous
+ https://bugs.webkit.org/show_bug.cgi?id=188201
+
+ Reviewed by Keith Miller.
+
+ We do not reuse the existing butterfly with Contiguous shape for new ArrayStorage butterfly.
+ When converting the butterfly with Contiguous shape to ArrayStorage, we always allocate a
+ new one. So this cellLock() is unnecessary for contiguous shape since contigous shaped butterfly
+ never becomes broken state. This patch removes unnecessary locking.
+
+ * runtime/JSObject.cpp:
+ (JSC::JSObject::visitButterflyImpl):
+
2018-07-31 Guillaume Emont <[email protected]>
[JSC] Remove gcc warnings for 32-bit platforms
Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (234433 => 234434)
--- trunk/Source/_javascript_Core/runtime/JSObject.cpp 2018-07-31 18:37:18 UTC (rev 234433)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp 2018-07-31 18:48:44 UTC (rev 234434)
@@ -395,12 +395,13 @@
Dependency indexingModeDependency = Dependency::fence(indexingMode);
Locker<JSCellLock> locker(NoLockingNecessary);
switch (indexingMode) {
- case ALL_CONTIGUOUS_INDEXING_TYPES:
case ALL_ARRAY_STORAGE_INDEXING_TYPES:
// We need to hold this lock to protect against changes to the innards of the butterfly
- // that can happen when the butterfly is used for array storage. We conservatively
- // assume that a contiguous butterfly may transform into an array storage one, though
- // this is probably more conservative than necessary.
+ // that can happen when the butterfly is used for array storage.
+ // We do not need to hold this lock for contiguous butterflies. We do not reuse the existing
+ // butterfly with contiguous shape for new array storage butterfly. When converting the butterfly
+ // with contiguous shape to array storage, we always allocate a new one. Holding this lock for contiguous
+ // butterflies is unnecessary since contiguous shaped butterfly never becomes broken state.
locker = holdLock(cellLock());
break;
default:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes