Bug 186898 - ensureWritableX should only convert away from CoW when it will succeed
Summary: ensureWritableX should only convert away from CoW when it will succeed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-21 15:09 PDT by Saam Barati
Modified: 2018-06-22 14:03 PDT (History)
13 users (show)

See Also:


Attachments
patch (8.22 KB, patch)
2018-06-21 16:34 PDT, Saam Barati
keith_miller: review+
Details | Formatted Diff | Diff
patch for landing (8.38 KB, patch)
2018-06-21 16:59 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2018-06-21 15:09:17 PDT
Otherwise, we'll end up seeing non CoW in the array profile during OSR exit
Comment 1 Saam Barati 2018-06-21 16:34:18 PDT
Created attachment 343288 [details]
patch
Comment 2 Keith Miller 2018-06-21 16:38:08 PDT
Comment on attachment 343288 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=343288&action=review

> Source/JavaScriptCore/runtime/JSObject.cpp:1482
> +        if (hasInt32(indexingMode())) {

Nit I would do: leastUpperBoundOfIndexingTypes(indexingType() & IndexingShapeMask, Int32Shape) == Int32Shape

> Source/JavaScriptCore/runtime/JSObject.cpp:1517
> +        if (hasDouble(indexingMode()) || hasInt32(indexingMode())) {

Nit I would do: leastUpperBoundOfIndexingTypes(indexingType() & IndexingShapeMask, DoubleShape) == DoubleShape

> Source/JavaScriptCore/runtime/JSObject.cpp:1556
> +        if (hasContiguous(indexingMode()) || hasInt32(indexingMode()) || hasDouble(indexingMode())) {

Nit I would do: leastUpperBoundOfIndexingTypes(indexingType() & IndexingShapeMask, ContiguousShape) == ContiguousShape
Comment 3 Keith Miller 2018-06-21 16:38:27 PDT
r=me
Comment 4 Saam Barati 2018-06-21 16:59:36 PDT
Created attachment 343290 [details]
patch for landing
Comment 5 WebKit Commit Bot 2018-06-22 14:02:07 PDT
Comment on attachment 343290 [details]
patch for landing

Clearing flags on attachment: 343290

Committed r233098: <https://trac.webkit.org/changeset/233098>
Comment 6 WebKit Commit Bot 2018-06-22 14:02:08 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-06-22 14:03:19 PDT
<rdar://problem/41380999>