• Manos Koukoutos's avatar
    [wasm] Properly implement parsing of s33 values · 5df74c35
    Manos Koukoutos authored
    Motivation:
    We used to approximate s33/i33 value parsing by first checking for
    specific negative codes, and then parsing an u32 value if that failed.
    This is not correct in all cases.
    
    Changes:
    - Implement i33 parsing in Decoder.
    - Factor out parsing of heap types into read_heap_type.
    - Introduce HeapType::kBottom.
    - Introduce helper functions in WasmFeatures and value_type_reader.
    - Remove macros from the parsing of value types.
    - HeapType::code now returns an i32 for compatibility with the i33
      requirement.
    - Introduce HeapType::Repr.
    - Renamings: HeapType::type() -> representation(),
                 ValueType::heap() -> heap_representation()
    
    Bug: v8:7748
    Change-Id: I04deabce8837a48af2226411cd706a397f9e5725
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274118
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#68633}
    5df74c35
wasm-subtyping.cc 7.04 KB