Changeset 243299 in webkit
- Timestamp:
- Mar 21, 2019, 10:42:41 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/microbenchmarks/put-by-val-direct-large-index.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/JSObject.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r243294 r243299 1 2019-03-21 Tadeu Zagallo <tzagallo@apple.com> 2 3 JSObject::putDirectIndexSlowOrBeyondVectorLength should check if indexIsSufficientlyBeyondLengthForSparseMap 4 https://bugs.webkit.org/show_bug.cgi?id=196078 5 <rdar://problem/35925380> 6 7 Reviewed by Mark Lam. 8 9 Add a new benchmark that allocates several objects and invokes put_by_val_direct 10 with a large index. run-jsc-benchmarks says "definitely 1.6178x faster". 11 12 * microbenchmarks/put-by-val-direct-large-index.js: Added. 13 1 14 2019-03-21 Mark Lam <mark.lam@apple.com> 2 15 -
trunk/Source/JavaScriptCore/ChangeLog
r243295 r243299 1 2019-03-21 Tadeu Zagallo <tzagallo@apple.com> 2 3 JSObject::putDirectIndexSlowOrBeyondVectorLength should check if indexIsSufficientlyBeyondLengthForSparseMap 4 https://bugs.webkit.org/show_bug.cgi?id=196078 5 <rdar://problem/35925380> 6 7 Reviewed by Mark Lam. 8 9 Unlike the other variations of putByIndex, it only checked if the index 10 was larger than MIN_SPARSE_ARRAY_INDEX when the indexingType was 11 ALL_BLANK_INDEXING_TYPES. This resulted in a huge butterfly being 12 allocated for object literals (e.g. `{[9e4]: ...}`) and objects parsed 13 from JSON. 14 15 * runtime/JSObject.cpp: 16 (JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength): 17 1 18 2019-03-21 Tadeu Zagallo <tzagallo@apple.com> 2 19 -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r243079 r243299 3056 3056 ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm)); 3057 3057 } 3058 if (i >= MIN_SPARSE_ARRAY_INDEX) {3058 if (indexIsSufficientlyBeyondLengthForSparseMap(i, 0) || i >= MIN_SPARSE_ARRAY_INDEX) { 3059 3059 return putDirectIndexBeyondVectorLengthWithArrayStorage( 3060 3060 exec, i, value, attributes, mode, createArrayStorage(vm, 0, 0));
Note:
See TracChangeset
for help on using the changeset viewer.