• marja@chromium.org's avatar
    Refactor parser Checkpoints. · ad3a1a99
    marja@chromium.org authored
    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
    
    Review URL: https://codereview.chromium.org/485473004
    
    git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    ad3a1a99
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
include Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/fdlibm Loading commit data...
tools Loading commit data...
.DEPS.git Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...