Bug 198918 - Use even more "shortest form" formatting, and less "fixed precision" and "fixed width"
Summary: Use even more "shortest form" formatting, and less "fixed precision" and "fix...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-17 09:21 PDT by Darin Adler
Modified: 2020-01-14 09:17 PST (History)
44 users (show)

See Also:


Attachments
Patch (27.70 KB, patch)
2019-06-17 09:21 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (27.71 KB, patch)
2019-06-18 20:47 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-highsierra (3.62 MB, application/zip)
2019-06-18 21:57 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews122 for ios-simulator-wk2 (877.22 KB, application/zip)
2019-06-18 22:06 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (3.97 MB, application/zip)
2019-06-18 22:06 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews215 for win-future (14.54 MB, application/zip)
2019-06-18 22:13 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews116 for mac-highsierra (3.09 MB, application/zip)
2019-06-18 22:25 PDT, EWS Watchlist
no flags Details
Patch (26.31 KB, patch)
2020-01-01 13:18 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (26.83 KB, patch)
2020-01-01 18:31 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (30.73 KB, patch)
2020-01-03 09:49 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (31.13 KB, patch)
2020-01-03 09:59 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (27.13 KB, patch)
2020-01-03 10:43 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (27.01 KB, patch)
2020-01-03 11:54 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (62.36 KB, patch)
2020-01-03 15:06 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (62.37 KB, patch)
2020-01-03 18:02 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (61.11 KB, patch)
2020-01-03 19:21 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (61.24 KB, patch)
2020-01-12 11:21 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (61.24 KB, patch)
2020-01-12 15:30 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (279.54 KB, patch)
2020-01-12 16:37 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (283.59 KB, patch)
2020-01-13 09:13 PST, Darin Adler
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2019-06-17 09:21:23 PDT
Use even more "shortest form" formatting, and less "fixed precision" and "fixed width"
Comment 1 Darin Adler 2019-06-17 09:21:41 PDT Comment hidden (obsolete)
Comment 2 Darin Adler 2019-06-17 09:22:24 PDT
Not looking to make these changes yet, just hoping to use EWS to get some ideas about test output without running them locally.
Comment 3 EWS Watchlist 2019-06-17 09:24:22 PDT Comment hidden (obsolete)
Comment 4 Darin Adler 2019-06-18 20:47:39 PDT Comment hidden (obsolete)
Comment 5 EWS Watchlist 2019-06-18 21:57:27 PDT Comment hidden (obsolete)
Comment 6 EWS Watchlist 2019-06-18 21:57:28 PDT Comment hidden (obsolete)
Comment 7 EWS Watchlist 2019-06-18 22:06:33 PDT Comment hidden (obsolete)
Comment 8 EWS Watchlist 2019-06-18 22:06:34 PDT Comment hidden (obsolete)
Comment 9 EWS Watchlist 2019-06-18 22:06:45 PDT Comment hidden (obsolete)
Comment 10 EWS Watchlist 2019-06-18 22:06:46 PDT Comment hidden (obsolete)
Comment 11 EWS Watchlist 2019-06-18 22:13:30 PDT Comment hidden (obsolete)
Comment 12 EWS Watchlist 2019-06-18 22:13:32 PDT Comment hidden (obsolete)
Comment 13 EWS Watchlist 2019-06-18 22:25:22 PDT Comment hidden (obsolete)
Comment 14 EWS Watchlist 2019-06-18 22:25:24 PDT Comment hidden (obsolete)
Comment 15 Darin Adler 2020-01-01 13:18:37 PST Comment hidden (obsolete)
Comment 16 Darin Adler 2020-01-01 18:31:52 PST Comment hidden (obsolete)
Comment 17 Darin Adler 2020-01-03 09:49:18 PST Comment hidden (obsolete)
Comment 18 Darin Adler 2020-01-03 09:59:05 PST Comment hidden (obsolete)
Comment 19 Darin Adler 2020-01-03 10:43:48 PST Comment hidden (obsolete)
Comment 20 Darin Adler 2020-01-03 11:54:09 PST Comment hidden (obsolete)
Comment 21 Darin Adler 2020-01-03 15:06:15 PST Comment hidden (obsolete)
Comment 22 Darin Adler 2020-01-03 18:02:35 PST Comment hidden (obsolete)
Comment 23 Darin Adler 2020-01-03 19:21:48 PST Comment hidden (obsolete)
Comment 24 Joseph Pecoraro 2020-01-06 14:13:38 PST
Comment on attachment 386747 [details]
Patch

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

> Source/WebKit/NetworkProcess/cache/NetworkCacheEntry.cpp:242
> +    json.appendLiteral("\n}\n" "}");

This can probably be combined:

    - json.appendLiteral("\n}\n" "}");
    + json.appendLiteral("\n}\n}");
Comment 25 Darin Adler 2020-01-09 10:18:42 PST
Comment on attachment 386747 [details]
Patch

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

>> Source/WebKit/NetworkProcess/cache/NetworkCacheEntry.cpp:242
>> +    json.appendLiteral("\n}\n" "}");
> 
> This can probably be combined:
> 
>     - json.appendLiteral("\n}\n" "}");
>     + json.appendLiteral("\n}\n}");

Thanks, I will do that. Or maybe break it into three lines they way I did with the code above!
Comment 26 Darin Adler 2020-01-12 11:21:36 PST Comment hidden (obsolete)
Comment 27 Darin Adler 2020-01-12 15:30:31 PST Comment hidden (obsolete)
Comment 28 Darin Adler 2020-01-12 16:37:08 PST Comment hidden (obsolete)
Comment 29 Darin Adler 2020-01-13 09:13:32 PST
Created attachment 387538 [details]
Patch
Comment 30 Darin Adler 2020-01-13 19:29:45 PST
Sam, you should definitely review this one!
Comment 31 Darin Adler 2020-01-14 08:52:14 PST
Comment on attachment 387538 [details]
Patch

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

> Source/WebCore/platform/graphics/Color.cpp:335
> +    if (int thirdDigit = (alpha * 100 + 0x7F) / 0xFF % 10)

Just noticed that type here should be "unsigned" or "auto" rather than "int" I think. Not important either way.
Comment 32 Sam Weinig 2020-01-14 08:53:36 PST
Comment on attachment 387538 [details]
Patch

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

Very nice!

> Source/JavaScriptCore/API/tests/ExecutionTimeLimitTest.cpp:201
> +            CString scriptText = makeString(

I wonder if would make sense to have a makeUTF8CString function like this? Obviously, if tests were the only users, probably not, but I will keep an eye out for other cases.
Comment 33 Darin Adler 2020-01-14 09:02:50 PST
Comment on attachment 387538 [details]
Patch

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

>> Source/JavaScriptCore/API/tests/ExecutionTimeLimitTest.cpp:201
>> +            CString scriptText = makeString(
> 
> I wonder if would make sense to have a makeUTF8CString function like this? Obviously, if tests were the only users, probably not, but I will keep an eye out for other cases.

I had the *exact* same thought when coding this. Why make a UChar buffer only to narrow it to LChar/UTF-8 at the end? Can make the string the proper width every step of the way. And similarly, since this is only in a test, decided not to pursue it for now.
Comment 34 Darin Adler 2020-01-14 09:16:10 PST
Committed r254514: <https://trac.webkit.org/changeset/254514>
Comment 35 Radar WebKit Bug Importer 2020-01-14 09:17:25 PST
<rdar://problem/58569735>