• vogelheim's avatar
    Speed up parsing w/ grammar shortcut. · 7a100dff
    vogelheim authored
    Certain token combinations (e.g. number literal followed by semicolon) will
    result in a single AST node, but require many levels of recursive descent
    parsing to determine this (11 in this example). For some 'obvious'
    combinations, we'll simply generate the appropriate AST node fairly far up
    in the call tree.
    
    This yields a mild but consistent parser speedup. The main con is code duplication.
    
    [Speedup between 0..20ms in parse time among a set of 25 commonly used sites. Speedup of ~180ms for a site w/ a very large codebase (adwords.google.com). Minor slow-downs between 0..8ms for <20% of sites.]
    
    R=marja@chromium.org
    BUG=v8:4947
    
    Review-Url: https://codereview.chromium.org/2188153002
    Cr-Commit-Position: refs/heads/master@{#38591}
    7a100dff
Name
Last commit
Last update
..
OWNERS Loading commit data...
expression-classifier.h Loading commit data...
func-name-inferrer.cc Loading commit data...
func-name-inferrer.h Loading commit data...
parameter-initializer-rewriter.cc Loading commit data...
parameter-initializer-rewriter.h Loading commit data...
parser-base.h Loading commit data...
parser.cc Loading commit data...
parser.h Loading commit data...
pattern-rewriter.cc Loading commit data...
preparse-data-format.h Loading commit data...
preparse-data.cc Loading commit data...
preparse-data.h Loading commit data...
preparser.cc Loading commit data...
preparser.h Loading commit data...
rewriter.cc Loading commit data...
rewriter.h Loading commit data...
scanner-character-streams.cc Loading commit data...
scanner-character-streams.h Loading commit data...
scanner.cc Loading commit data...
scanner.h Loading commit data...
token.cc Loading commit data...
token.h Loading commit data...