Repository navigation
Commit 2d4cefa
committed
[JSC]
https://bugs.webkit.org/show_bug.cgi?id=329640
Reviewed by Yusuke Suzuki.
createFromArray has a path which reuses the JSCellButterfly of the input when it
is a CopyOnWriteArrayWithContiguous array. But it tested isCopyOnWrite() against
a value masked with IndexingShapeMask, which drops the CopyOnWrite bit, so the
path was never taken and we always allocated and copied.
This patch tests indexingMode() instead, as DFG and FTL Spread already do. This
affects LLInt, Baseline, and operationSpreadGeneric in DFG and FTL.
Baseline Patched
spread-copy-on-write-contiguous-array 96.4047+-1.7865 ^ 24.7634+-0.7149 ^ definitely 3.8930x faster
Tests: JSTests/microbenchmarks/spread-copy-on-write-contiguous-array.js
JSTests/stress/spread-copy-on-write-contiguous-array.js
* JSTests/microbenchmarks/spread-copy-on-write-contiguous-array.js: Added.
(test):
* JSTests/stress/spread-copy-on-write-contiguous-array.js: Added.
(shouldBe):
(collect):
(Collector):
(spreadToArray):
(spreadToArrayWithOthers):
(spreadToCall):
(spreadToCallWithOthers):
(spreadToConstruct):
(test):
(keepAlive):
* Source/JavaScriptCore/runtime/JSCellButterfly.h:
(JSC::JSCellButterfly::createFromArray):
Canonical link: https://commits.webkit.org/325417@mainJSCellButterfly::createFromArray should share the butterfly of a CopyOnWriteArrayWithContiguous array1 parent eae6b25 commit 2d4cefa
3 files changed
Lines changed: 130 additions & 1 deletion
File tree
- JSTests
- microbenchmarks
- stress
- Source/JavaScriptCore/runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments