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

Issue 2267663002: [parser] Apply an adaptation of the CRTP (Closed)

Created:
4 years, 4 months ago by nickie
Modified:
4 years, 4 months ago
Reviewers:
adamk, marja
CC:
v8-reviews_googlegroups.com, Toon Verwaest
Base URL:
https://chromium.googlesource.com/v8/v8.git@nickie-2263973003-add-const
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[parser] Apply an adaptation of the CRTP This patch applies an adaptation of the Curiously Recurring Template Pattern to the parser objects. The result is roughly: // Common denominator, needed to avoid cyclic dependency. // Instances of this template will end up with very minimal // definitions, ideally containing just typedefs. template <typename Impl> class ParserBaseTraits; // The parser base object, which should just implement pure // parser behavior. The Impl parameter is the actual derived // class (according to CRTP), which implements impure parser // behavior. template <typename Impl> class ParserBase : public ParserBaseTraits<Impl> { ... }; // And then, for each parser variant: class Parser; template <> class ParserBaseTraits<Parser> { ... }; class Parser : public ParserBase<Parser> { ... }; Using the CRTP, we will ultimately achieve two goals: (1) clean up the traits objects, but most importantly (2) clearly separate pure/impure parser implementation and facilitate experimentation with different parser variants. R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Committed: https://crrev.com/6c2c17cd4d0f585509cb32566e7489f97ad2d5f5 Cr-Commit-Position: refs/heads/master@{#38819}

Patch Set 1 #

Patch Set 2 : Rebase w.r.t. PS#2 of 2263973003 #

Total comments: 4

Patch Set 3 : Rebase #

Patch Set 4 : Changes after reviewers' comments #

Patch Set 5 : Formatting #

Unified diffs Side-by-side diffs Delta from patch set Stats (+504 lines, -526 lines) Patch
M src/parsing/parser.h View 1 2 3 4 7 chunks +71 lines, -80 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 24 chunks +178 lines, -194 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 46 chunks +182 lines, -171 lines 0 comments Download
M src/parsing/preparser.h View 1 2 9 chunks +52 lines, -54 lines 0 comments Download
M src/parsing/preparser.cc View 1 2 3 4 5 chunks +21 lines, -27 lines 0 comments Download

Messages

Total messages: 21 (12 generated)
nickie
4 years, 4 months ago (2016-08-22 10:16:05 UTC) #1
adamk
this lgtm as a first step, but please wait for marja's lgtm too (I think ...
4 years, 4 months ago (2016-08-22 18:54:14 UTC) #7
marja
lgtm % metacomment (comment about comment) https://codereview.chromium.org/2267663002/diff/20001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2267663002/diff/20001/src/parsing/parser-base.h#newcode160 src/parsing/parser-base.h:160: Could you add ...
4 years, 4 months ago (2016-08-23 09:09:39 UTC) #8
nickie
https://codereview.chromium.org/2267663002/diff/20001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2267663002/diff/20001/src/parsing/parser-base.h#newcode160 src/parsing/parser-base.h:160: On 2016/08/23 09:09:39, marja wrote: > Could you add ...
4 years, 4 months ago (2016-08-23 12:10:12 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2267663002/60001
4 years, 4 months ago (2016-08-23 12:13:05 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/22362)
4 years, 4 months ago (2016-08-23 12:20:35 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2267663002/80001
4 years, 4 months ago (2016-08-23 12:29:25 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-23 12:54:39 UTC) #19
commit-bot: I haz the power
4 years, 4 months ago (2016-08-23 12:54:58 UTC) #21
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/6c2c17cd4d0f585509cb32566e7489f97ad2d5f5
Cr-Commit-Position: refs/heads/master@{#38819}

Powered by Google App Engine
This is Rietveld 408576698