Bug 178949

Summary: Bytecode liveness should live on UnlinkedCodeBlock so it can be shared amongst CodeBlocks
Product: WebKit Reporter: Saam Barati <sbarati>
Component: JavaScriptCoreAssignee: Saam Barati <sbarati>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, buildbot, commit-queue, fpizlo, ggaren, gskachkov, jfbastien, keith_miller, mark.lam, msaboff, rmorisset, ticaiolima, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP
none
WIP
none
patch
none
patch
none
patch
none
patch none

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>