• Toon Verwaest's avatar
    [scanner] Go back to untemplatized scanning with buffering · fcfd995a
    Toon Verwaest authored
    This reverts the following 3 CLs:
    
    Revert "[scanner] Templatize scan functions by encoding"
    Revert "[asm] Remove invalid static cast of character stream"
    Revert "[scanner] Prepare CharacterStreams for specializing scanner and parser by character type"
    
    The original idea behind this work was to avoid copying, converting and
    buffering characters to be scanned by specializing the scanner functions. The
    additional benefit was for scanner functions to have a bigger window over the
    input. Even though we can get a pretty nice speedup from having a larger
    window, in practice this rarely helps. The cost is a larger binary.
    
    Since we can't eagerly convert utf8 to utf16 due to memory overhead, we'd also
    need to have a specialized version of the scanner just for utf8. That's pretty
    complex, and likely won't be better than simply bulk converting and buffering
    utf8 as utf16.
    
    Change-Id: Ic3564683932a0097e3f9f51cd88f62c6ac879dcb
    Reviewed-on: https://chromium-review.googlesource.com/1183190Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
    Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#55258}
    fcfd995a
asm-scanner.h 5.72 KB