1. 21 Jul, 2020 2 commits
  2. 20 Jul, 2020 2 commits
  3. 10 Jul, 2020 2 commits
  4. 09 Jul, 2020 2 commits
    • Manos Koukoutos's avatar
      [wasm-gc] Preparation for rtt global initializers · 8b9c2ac3
      Manos Koukoutos authored
      Motivation: With rtt.sub now allowed in constant expressions, we have
      to generalize WasmInitExpr to be able to handle expressions with
      operands. This is the second CL that prepares the ground for this
      change.
      
      Changes:
      - Remove the error from read-value-type when reading a generic rtt.
      - Add validation for HeapTypeImmediate in ModuleDecoder. Use it to
        validate null constants immediates, which was missing. Add tests.
      - Change ValueType::name to print rtt depths as integers.
      - Move global initializer building in wasm-module-builder to its own
        function.
      
      Bug: v8:7748
      Change-Id: Ic041e1c7d032f2a1063a21fec1bfe96cb0d8120e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284983
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68767}
      8b9c2ac3
    • Manos Koukoutos's avatar
      [wasm-gc] Refactoring in preparation of generalizing WasmInitExpr · 01e59c4b
      Manos Koukoutos authored
      Motivation: With rtt.sub now allowed in constant expressions, we have
      to generalize WasmInitExpr to be able to handle expressions with
      operands. This CL prepares the ground for this change and adds no
      functionality.
      
      Changes:
      - ValueType::heap_representation and HeapType::representation now
        return HeapType::Representation.
      - Add ValueType::is_rtt().
      - WasmInitExpr:
        - Make kind private. Rename val -> operator, make it private. Add
          accessors.
        - Rename kGlobalIndex -> kGlobalGet.
        - Squash global_index and function_index into index.
        - Add heap_type Immediate. Use it for RefNullConst. TypeOf in
          module-decoder.cc can now fully determine the type of a
          WasmInitExpr.
        - Add class constructors/static method constructors for each Operator
          kind.
        - Delete copy constructor. WasmInitExpr will use std::unique_ptr for
          its operands.
      - consume_init_expr now uses a stack.
      - A few minor improvements.
      
      Bug: v8:7748
      Change-Id: I3ba3ee7ac2d6bc58e887790c37110ceb80658985
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284483
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68759}
      01e59c4b
  5. 02 Jul, 2020 1 commit
  6. 29 Jun, 2020 1 commit
  7. 26 Jun, 2020 1 commit
    • Manos Koukoutos's avatar
      [wasm][refactor] Rework immediate-argument abstractions · 55ddbaa0
      Manos Koukoutos authored
      Motivation:
      The immediate-argument classes defined in function-body-decoder.h were
      often adding an offset to the provided pc. This was inconsistent,
      bug-prone, and counterintuitive. This CL imposes that all immediates
      are passed as pc the start of the immediate argument they are parsing.
      Some other smaller inconsistencies are fixed as well.
      
      Changes:
      
      src/wasm/:
      - Enforce that all Immediates are passed the pc at the start of the
        argument they are parsing. Adapt all call sites.
      - Remove unneeded offset arguments from two SIMD related immediates.
      - Add a pc argument to all Validate functions for immediates instead
        of using the Decoder's current pc.
      - Remove the (unused) pc argument from all Complete functions for
        immediates.
      - Introduce Validate() for BranchOnExceptionImmediate.
      - In WasmDecoder::Decode(), make sure len is updated before breaking out
        of the loop in case of a Validate() failure.
      - Change the default prefix_len of DecodeLoadMem/DecodeStoreMem to 1.
      
      wasm-interpreter.cc:
      - Change the default prefix_len of ExecuteLoad/Store to 1.
      - Adapt offsets in calls to Immediates.
      - Remove redundant opcode_length argument from ExecuteSimdOp, use len
        in its place.
      
      function-body-decoder-unittest.cc
      - Adapt offsets in calls to Immediates.
      - Introduce and use EXPECT_OK, as is done in other tests.
      
      Change-Id: I534606c0e238af309804d4a7c8cec75b1e49c6ad
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2267381
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68559}
      55ddbaa0
  8. 25 Jun, 2020 1 commit
    • Clemens Backes's avatar
      [wasm] Experimentally allow modules >1GB · 49097109
      Clemens Backes authored
      Add an experimental flag to allow modules up to a size slightly below
      2GB, to make sure that we don't run into integer overflows.
      Modules this large are not tested at all currently, hence the explicit
      "experimental" in the flag name.
      
      Drive-by: Fix one comparison to use ">" instead of ">=".
      
      R=ahaas@chromium.org
      CC=​bmeurer@chromium.org
      
      Bug: v8:10642
      Change-Id: I91cfc290c262b9b81750e3c8af5358c1cd2572b1
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2266535Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68547}
      49097109
  9. 24 Jun, 2020 1 commit
  10. 23 Jun, 2020 1 commit
  11. 19 Jun, 2020 1 commit
  12. 18 Jun, 2020 1 commit
    • Manos Koukoutos's avatar
      [wasm-gc] Change ValueType representation to account for new types · 52f65296
      Manos Koukoutos authored
      Motivation:
      Changes to the typed function references and gc proposals solidified
      the notion of heap type, clarified nullable vs. non-nullable reference
      types, and introduced rtts, which contain an integer depth field in
      addition to a heap type. This required us to overhaul our ValueType
      representation, which results in extensive changes.
      
      To keep this CL "small", we do not try to implement the binary encoding
      as described in the proposals, but rather devise a simpler one of our
      own (see below). Also, we do not try to implement additional
      functionality for the new types.
      
      Changes:
      - Introduce HeapType. Move heap types from ValueType to HeapType.
      - Introduce Nullability for reference types.
      - Rework ValueType helper methods.
      - Introduce rtts in ValueType with an integer depth field. Include depth
        in the ValueType encoding.
      - Make the constructor of ValueType private, instead expose static
        functions which explicitly state what they create.
      - Change every switch statement on ValueType::Kind. Sometimes, we need
        nested switches.
      - Introduce temporary constants in ValueTypeCode for nullable types,
        use them for decoding.
      - In WasmGlobalObject, split 'flags' into 'raw_type' and 'is_mutable'.
      - Change IsSubtypeOfRef to IsSubtypeOfHeap and implement changes in
        subtyping.
      - kWasmFuncRef initializers are now non-nullable. Initializers are
        only required to be subtypes of the declared global type.
      - Change tests and fuzzers as needed.
      
      Bug: v8:7748
      Change-Id: If41f783bd4128443b07e94188cea7dd53ab0bfa5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2247657
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68408}
      52f65296
  13. 17 Jun, 2020 1 commit
  14. 16 Jun, 2020 2 commits
  15. 10 Jun, 2020 1 commit
  16. 09 Jun, 2020 2 commits
  17. 05 Jun, 2020 2 commits
  18. 03 Jun, 2020 2 commits
  19. 27 May, 2020 1 commit
  20. 26 May, 2020 1 commit
  21. 18 May, 2020 2 commits
    • Jakob Kummerow's avatar
      [cleanup] Replace some "default:" with explicit cases · f87539b4
      Jakob Kummerow authored
      When the intention is to handle every case, *and* when we can be
      reasonably sure that no invalid enum values will occur (e.g. from
      reading untrusted data), then we shouldn't have a "default:" case
      in a switch statement so that the compiler will warn us when a
      case is missing.
      
      Bug: v8:10506
      Change-Id: Iefdebd54802611e7ec3479afa3c4e6506f97a095
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2204284
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67854}
      f87539b4
    • Manos Koukoutos's avatar
      [wasm] Refactor/cleanup DecodeLocals, read_value_type · a4d295ad
      Manos Koukoutos authored
      Changes:
      Cleanup:
      - Make sure read_value_type has the same interface as other
        read_* functions, i.e., returns the decoded value and writes
        the consumed length into a pointer.
      - DecodeLocals is now an instance method.
      - DecodeLocals should fail when given a wrong number of locals.
        Add tests to catch that.
      - Fix a buggy test.
      
      Refactoring in preparation of introducing the 'let'
      instruction as per [wasm-gc]:
      - DecodeLocals does not consume any input and can start from any pc.
      - DecodeLocals gives the option of not appending the decoded
        locals to local_types_.
      - Separate locals initialization from signature.
      
      Bug: v8:7748
      Change-Id: Iaaff87fdb9abe0ddd716484ea3fa87779d2d1a2f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2202992
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67845}
      a4d295ad
  22. 06 May, 2020 2 commits
  23. 05 May, 2020 1 commit
  24. 21 Apr, 2020 1 commit
  25. 20 Apr, 2020 2 commits
  26. 17 Apr, 2020 1 commit
  27. 06 Apr, 2020 1 commit
  28. 30 Mar, 2020 1 commit
  29. 27 Mar, 2020 1 commit