Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Issue 604743003: MakeNames: Generate global constants in a loop rather than in sequence. (Closed)

Created:
6 years, 2 months ago by Daniel Bratell
Modified:
6 years, 2 months ago
Reviewers:
haraken, Jens Widell
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Generate global constants in a loop rather than in sequence. The generated code just repeated the same code over and over again which resulted in larger machine code than necessary. Doing the same thing with a data table and a loop makes the code more compact and efficient. clang x64 diff: Total change: -72804 bytes ========================== 281 added, totalling +21557 bytes across 1 sources 1482 removed, totalling -10809 bytes across 1 sources 2 grown, for a net change of +2 bytes (3 bytes before, 5 bytes after) across 1 sources 19 shrunk, for a net change of -83554 bytes (87001 bytes before, 3447 bytes after) across 17 sources BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182780

Patch Set 1 : MakeNames: Generate constants in a loop instead of in a sequence. #

Patch Set 2 : MakeNames: In a loop instead of in a sequence. #

Total comments: 7

Patch Set 3 : MakeNames: With more well defined sorting. #

Patch Set 4 : MakeNames: Rebased to newer origin/master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -36 lines) Patch
M Source/build/scripts/templates/MakeNames.cpp.tmpl View 1 2 1 chunk +22 lines, -12 lines 0 comments Download
M Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl View 1 2 3 4 chunks +55 lines, -24 lines 0 comments Download

Messages

Total messages: 21 (7 generated)
Daniel Bratell
Please take a look at this patch that changes code from just repeating itself to ...
6 years, 2 months ago (2014-09-25 16:37:12 UTC) #4
Jens Widell
https://codereview.chromium.org/604743003/diff/60001/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl File Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl (right): https://codereview.chromium.org/604743003/diff/60001/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl#newcode23 Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl:23: const {{namespace}}QualifiedName& {{tag|symbol}}Tag = reinterpret_cast<{{namespace}}QualifiedName*>(&{{suffix}}TagStorage)[{{loop.index0}}]; Could you declare an ...
6 years, 2 months ago (2014-09-25 17:16:17 UTC) #5
Jens Widell
6 years, 2 months ago (2014-09-25 17:16:19 UTC) #6
Daniel Bratell
https://codereview.chromium.org/604743003/diff/60001/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl File Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl (right): https://codereview.chromium.org/604743003/diff/60001/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl#newcode23 Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl:23: const {{namespace}}QualifiedName& {{tag|symbol}}Tag = reinterpret_cast<{{namespace}}QualifiedName*>(&{{suffix}}TagStorage)[{{loop.index0}}]; On 2014/09/25 17:16:16, Jens ...
6 years, 2 months ago (2014-09-25 17:48:42 UTC) #7
Jens Widell
On 2014/09/25 17:48:42, Daniel Bratell wrote: > But it doesn't matter. It collapses to no ...
6 years, 2 months ago (2014-09-25 18:02:47 UTC) #8
Daniel Bratell
On 2014/09/25 18:02:47, Jens Widell wrote: > On 2014/09/25 17:48:42, Daniel Bratell wrote: > > ...
6 years, 2 months ago (2014-09-25 19:40:49 UTC) #9
Jens Widell
https://codereview.chromium.org/604743003/diff/60001/Source/build/scripts/templates/MakeNames.cpp.tmpl File Source/build/scripts/templates/MakeNames.cpp.tmpl (right): https://codereview.chromium.org/604743003/diff/60001/Source/build/scripts/templates/MakeNames.cpp.tmpl#newcode19 Source/build/scripts/templates/MakeNames.cpp.tmpl:19: {% for entry in entries|sort(case_sensitive=True) %} Since we're sorting ...
6 years, 2 months ago (2014-09-26 06:09:46 UTC) #10
Daniel Bratell
I've changed the sorting. Since it sorts something that isn't directly visible in the output ...
6 years, 2 months ago (2014-09-26 07:59:29 UTC) #11
Jens Widell
On 2014/09/26 07:59:29, Daniel Bratell wrote: > I've changed the sorting. Since it sorts something ...
6 years, 2 months ago (2014-09-26 08:44:58 UTC) #12
haraken
LGTM
6 years, 2 months ago (2014-09-26 09:24:16 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/604743003/80001
6 years, 2 months ago (2014-09-26 13:05:55 UTC) #15
commit-bot: I haz the power
Failed to apply patch for Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 2 months ago (2014-09-26 13:06:03 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/604743003/100001
6 years, 2 months ago (2014-09-26 16:39:04 UTC) #20
commit-bot: I haz the power
6 years, 2 months ago (2014-09-26 19:29:56 UTC) #21
Message was sent while issue was closed.
Committed patchset #4 (id:100001) as 182780

Powered by Google App Engine
This is Rietveld 408576698