• Manos Koukoutos's avatar
    [wasm] Simplify Immediates in decoder · f9db82ab
    Manos Koukoutos authored
    Changes:
    - Merge all immediates which read a u32_v index into IndexImmediate.
      Refactor overloaded Validate(const byte*, [Type]Immediate) functions
      to Validate[Type](const byte*, IndexImmediate).
    - Move MemoryIndexImmediate/MemoryAccessImmediate validation into their
      own Validate functions. Remove CheckHasMemory(), move its
      functionality into these Validate() functions.
    - Refactor MemoryInitImmediate, TableInitImmediate and
      CallIndirectImmediate as composite immediates.
    - Change field initializations for some Immediates to constructor
      initializers. This helps us drop some useless default constructors.
    - Use the correct pc in StackEffect for struct.new_default.
    
    Bug: v8:11831
    Change-Id: I878f69a33f8473dc275184995b3b7b88fe0dfc8a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928498Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#74948}
    f9db82ab
wasm-interpreter.cc 176 KB