• Leszek Swirski's avatar
    [serializer] Clean up value encoding in bytecodes · 1a4efddb
    Leszek Swirski authored
    Unify the encoding/decoding of values into a ranged bytecode with a
    single templated class that takes the bytecode, minimum, and maximum,
    and provides Encode and Decode methods.
    
    This class also handles range checks on both the input and output,
    which (along with a few other byte cases) allows us to get rid of the
    PutSection method.
    
    Change-Id: Icb2cd409607ce7b650226eb8dca80c0e363a8acc
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2369172
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Auto-Submit: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69642}
    1a4efddb
snapshot-source-sink.cc 1.43 KB