• Ross McIlroy's avatar
    [Parsing] Always pass a valid character-stream into the parser · 1bc01952
    Ross McIlroy authored
    Changes the contract of the parser to have a valid character stream passed
    in the ParseInfo rather than the current situation where either:
     - it is passed explicitly (e.g., for streaming scripts)
     - a Script is passed and a character stream is created for this
     - or a source and encoding is passed in ParseInfo and the character stream
       is created from this.
    
    The parse info also now owns the character stream (in a unique_ptr). It
    can be destroyed using a new ResetCharacterStream() function. This will
    enable the character stream to be kept live if any functions are asm.js
    modules which were parsed, in order to be reused by the asm.js parser.
    
    BUG=v8:5203
    
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
    Change-Id: Ifda167391b2eadb38ebf9fcb2f565d2ed9ea3c6f
    Reviewed-on: https://chromium-review.googlesource.com/616767
    Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
    Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#47474}
    1bc01952
parse-info.cc 7.05 KB