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

Issue 485473004: Refactor parser Checkpoints. (Closed)

Created:
6 years, 4 months ago by marja
Modified:
6 years, 4 months ago
Reviewers:
wingo, rossberg
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Refactor parser Checkpoints. Why this is better: 1) Not needing an extra template parameter for Checkpoints ctors. This was especially confusing since the template parameter was named Parser and Parser is also used as a type name and is also a concrete type. This CL makes it clear that ParserTraits::Checkpoint is consturcted with ParserBase<ParserTraits> - that's the only sensemaking type for the ctor param anyway. 2) This CL makes ParserBase define a Checkpoint base class (which knows how to create and restore a checkpoint with ParserBase) which PreParserTraits::Checkpoint and ParserTraits::Checkpoint inherit, and not the other way around. This is a more intuitive way to implement the "base functionality + extending it" concept than the previous solution. The previous solution was to allow Traits to define a Checkpoint class and make ParserBase<Traits>::ParserCheckpoint (which defines the base functionality) inherit from it. 3) This CL moves the Checkpoint class definitions out of the SomeTraits::Type struct; SomeTraits::Type is supposed to be a collection of typedefs and not contain anything else. Checkpoints were introduced in r22925 ( https://codereview.chromium.org/443903003 ). BUG= R=wingo@igalia.com Committed: https://code.google.com/p/v8/source/detail?r=23266

Patch Set 1 #

Patch Set 2 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -31 lines) Patch
M src/parser.h View 1 2 chunks +2 lines, -15 lines 0 comments Download
M src/parser.cc View 1 chunk +20 lines, -0 lines 0 comments Download
M src/preparser.h View 1 7 chunks +8 lines, -16 lines 0 comments Download
M src/preparser.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
marja
wingo, rossberg, ptal.
6 years, 4 months ago (2014-08-21 09:06:59 UTC) #1
wingo
much better than the terrible thing I did, lgtm
6 years, 4 months ago (2014-08-21 09:10:35 UTC) #2
marja
6 years, 4 months ago (2014-08-21 09:22:20 UTC) #3
Message was sent while issue was closed.
Committed patchset #2 manually as 23266 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698