Bug 178949 - Bytecode liveness should live on UnlinkedCodeBlock so it can be shared amongst CodeBlocks
Summary: Bytecode liveness should live on UnlinkedCodeBlock so it can be shared amongs...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-10-27 12:57 PDT by Saam Barati
Modified: 2017-11-15 12:40 PST (History)
14 users (show)

See Also:


Attachments
WIP (33.44 KB, patch)
2017-10-27 14:52 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
WIP (36.68 KB, patch)
2017-10-27 15:12 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (41.21 KB, patch)
2017-10-27 16:00 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (41.26 KB, patch)
2017-10-27 16:09 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (41.44 KB, patch)
2017-10-27 16:16 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (41.17 KB, patch)
2017-10-27 16:55 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 2017-10-27 12:57:42 PDT
...
Comment 1 Saam Barati 2017-10-27 14:52:45 PDT
Created attachment 325201 [details]
WIP

refactoring
Comment 2 Saam Barati 2017-10-27 15:12:35 PDT
Created attachment 325204 [details]
WIP
Comment 3 Saam Barati 2017-10-27 15:14:42 PDT
(In reply to Saam Barati from comment #2)
> Created attachment 325204 [details]
> WIP

It seems to work.
Comment 4 Build Bot 2017-10-27 15:15:11 PDT
Attachment 325204 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/bytecode/BytecodeLivenessAnalysis.cpp:89:  Should have a space between // and comment  [whitespace/comments] [4]
ERROR: Source/JavaScriptCore/bytecode/BytecodeLivenessAnalysis.cpp:91:  Should have a space between // and comment  [whitespace/comments] [4]
ERROR: Source/JavaScriptCore/bytecode/BytecodeLivenessAnalysis.cpp:92:  Should have a space between // and comment  [whitespace/comments] [4]
ERROR: Source/JavaScriptCore/bytecode/BytecodeLivenessAnalysis.cpp:93:  Should have a space between // and comment  [whitespace/comments] [4]
ERROR: Source/JavaScriptCore/bytecode/BytecodeLivenessAnalysis.cpp:95:  Should have a space between // and comment  [whitespace/comments] [4]
ERROR: Source/JavaScriptCore/bytecode/BytecodeLivenessAnalysis.cpp:117:  Should have a space between // and comment  [whitespace/comments] [4]
Total errors found: 6 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Saam Barati 2017-10-27 16:00:41 PDT
Created attachment 325212 [details]
patch
Comment 6 Saam Barati 2017-10-27 16:09:04 PDT
Created attachment 325213 [details]
patch
Comment 7 Saam Barati 2017-10-27 16:14:28 PDT
Comment on attachment 325213 [details]
patch

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

> Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:430
> +    {
> +        auto locker = holdLock(m_lock);
> +        m_liveness = std::make_unique<BytecodeLivenessAnalysis>(codeBlock);
> +    }

Keith pointed out I need to check if we have m_liveness already or not to avoid computing it twice.
Comment 8 Saam Barati 2017-10-27 16:16:10 PDT
Created attachment 325214 [details]
patch
Comment 9 Saam Barati 2017-10-27 16:55:14 PDT
Created attachment 325219 [details]
patch
Comment 10 Keith Miller 2017-10-27 16:57:08 PDT
Comment on attachment 325219 [details]
patch

r=me if you get GCC working.
Comment 11 WebKit Commit Bot 2017-10-27 18:03:25 PDT
Comment on attachment 325219 [details]
patch

Clearing flags on attachment: 325219

Committed r224138: <https://trac.webkit.org/changeset/224138>
Comment 12 WebKit Commit Bot 2017-10-27 18:03:27 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Radar WebKit Bug Importer 2017-11-15 12:40:05 PST
<rdar://problem/35567840>