Bug 165247

Summary: Refactor SymbolImpl layout
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: Web Template FrameworkAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=193291
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews114 for mac-yosemite
none
Patch darin: review+

Yusuke Suzuki
Reported 2016-12-01 00:47:27 PST
Let's put field in SymbolImpl. And add a flag for Null symbol (`Symbol()`).
Attachments
Patch (31.26 KB, patch)
2016-12-01 03:45 PST, Yusuke Suzuki
no flags
Patch (31.07 KB, patch)
2016-12-01 03:50 PST, Yusuke Suzuki
no flags
Patch (31.08 KB, patch)
2016-12-01 03:52 PST, Yusuke Suzuki
no flags
Patch (31.84 KB, patch)
2016-12-01 05:24 PST, Yusuke Suzuki
no flags
Patch (31.85 KB, patch)
2016-12-01 05:29 PST, Yusuke Suzuki
no flags
Patch (31.23 KB, patch)
2016-12-01 05:36 PST, Yusuke Suzuki
no flags
Patch (31.23 KB, patch)
2016-12-01 05:40 PST, Yusuke Suzuki
no flags
Patch (31.17 KB, patch)
2016-12-01 05:54 PST, Yusuke Suzuki
no flags
Archive of layout-test-results from ews114 for mac-yosemite (313.90 KB, application/zip)
2016-12-01 06:59 PST, Build Bot
no flags
Patch (31.11 KB, patch)
2016-12-01 20:52 PST, Yusuke Suzuki
darin: review+
Yusuke Suzuki
Comment 1 2016-12-01 03:45:53 PST
WebKit Commit Bot
Comment 2 2016-12-01 03:48:19 PST
Attachment 295830 [details] did not pass style-queue: ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:39: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:40: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:41: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 3 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 3 2016-12-01 03:50:52 PST
Yusuke Suzuki
Comment 4 2016-12-01 03:52:08 PST
WebKit Commit Bot
Comment 5 2016-12-01 03:53:20 PST
Attachment 295832 [details] did not pass style-queue: ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:39: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:40: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:41: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 3 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 6 2016-12-01 05:24:23 PST
WebKit Commit Bot
Comment 7 2016-12-01 05:25:40 PST
Attachment 295836 [details] did not pass style-queue: ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:39: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:40: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:41: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 3 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 8 2016-12-01 05:29:45 PST
WebKit Commit Bot
Comment 9 2016-12-01 05:32:29 PST
Attachment 295837 [details] did not pass style-queue: ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:39: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:40: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:41: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 3 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 10 2016-12-01 05:36:25 PST
WebKit Commit Bot
Comment 11 2016-12-01 05:39:20 PST
Attachment 295838 [details] did not pass style-queue: ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:39: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:40: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:41: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 3 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 12 2016-12-01 05:40:54 PST
WebKit Commit Bot
Comment 13 2016-12-01 05:42:26 PST
Attachment 295839 [details] did not pass style-queue: ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:39: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:40: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:41: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 3 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 14 2016-12-01 05:54:31 PST
WebKit Commit Bot
Comment 15 2016-12-01 05:57:14 PST
Attachment 295840 [details] did not pass style-queue: ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:39: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:40: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:41: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 3 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 16 2016-12-01 06:59:46 PST
Comment on attachment 295840 [details] Patch Attachment 295840 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2601095 Number of test failures exceeded the failure limit.
Build Bot
Comment 17 2016-12-01 06:59:50 PST
Created attachment 295848 [details] Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Yusuke Suzuki
Comment 18 2016-12-01 20:52:28 PST
WebKit Commit Bot
Comment 19 2016-12-01 20:54:03 PST
Attachment 295927 [details] did not pass style-queue: ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:39: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:40: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WTF/wtf/text/UniquedStringImpl.h:41: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 3 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 20 2016-12-02 02:19:41 PST
And this also paves the way for static SymbolImpl.
Darin Adler
Comment 21 2016-12-02 09:35:01 PST
Comment on attachment 295927 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295927&action=review > Source/WTF/wtf/text/StringImpl.cpp:118 > + SymbolImpl& symbol = static_cast<SymbolImpl&>(*this); I would use auto& here. > Source/WTF/wtf/text/StringImpl.cpp:120 > + if (symbol.symbolRegistry()) > + symbol.symbolRegistry()->remove(symbol); I typically would put this into a scoped local variable, but not everyone agrees and I think it’s likely that the generated code will be identical. > Source/WTF/wtf/text/StringImpl.h:732 > + enum CreateSymbolTag { CreateSymbol }; > + // Used to create new symbol strings that holds existing 8-bit [[Description]] string as a substring buffer (BufferSubstring). I suggest a blank line here after the enum. > Source/WTF/wtf/text/SymbolImpl.cpp:56 > + return adoptRef(*new SymbolImpl()); No need for () here after SymbolImpl. > Source/WTF/wtf/text/SymbolImpl.h:109 > +} > + > + > + > #if !ASSERT_DISABLED Should just have one blank line, not three.
Yusuke Suzuki
Comment 22 2016-12-03 16:29:16 PST
Comment on attachment 295927 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295927&action=review >> Source/WTF/wtf/text/StringImpl.cpp:118 >> + SymbolImpl& symbol = static_cast<SymbolImpl&>(*this); > > I would use auto& here. Fixed. >> Source/WTF/wtf/text/StringImpl.cpp:120 >> + symbol.symbolRegistry()->remove(symbol); > > I typically would put this into a scoped local variable, but not everyone agrees and I think it’s likely that the generated code will be identical. OK, i'll change this to `auto* symbolRegistry = symbol.symbolRegistry()`. >> Source/WTF/wtf/text/StringImpl.h:732 >> + // Used to create new symbol strings that holds existing 8-bit [[Description]] string as a substring buffer (BufferSubstring). > > I suggest a blank line here after the enum. Inserted. >> Source/WTF/wtf/text/SymbolImpl.cpp:56 >> + return adoptRef(*new SymbolImpl()); > > No need for () here after SymbolImpl. Dropped. >> Source/WTF/wtf/text/SymbolImpl.h:109 >> #if !ASSERT_DISABLED > > Should just have one blank line, not three. Ooops. Fixed.
Yusuke Suzuki
Comment 23 2016-12-03 16:30:01 PST
Note You need to log in before you can comment on or make changes to this bug.