1. 15 Oct, 2020 1 commit
  2. 13 Oct, 2020 1 commit
  3. 08 Oct, 2020 1 commit
    • Clemens Backes's avatar
      [wasm] Simplify LEB decoding · 5bf16197
      Clemens Backes authored
      Remove one "mode" of LEB decoding by eliminating the {AdvancePCFlag},
      and doing the PC advance in the caller instead.
      The returned length is now always zero in case of an error, thus remove
      the respective checks from the unit tests. The returned length does not
      really matter if we ran into an error.
      
      R=thibaudm@chromium.org
      
      Change-Id: Ibfd94dd981cefa2fc24c7af560c85afd1c826f2c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2449972Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70404}
      5bf16197
  4. 05 Oct, 2020 1 commit
    • Manos Koukoutos's avatar
      [wasm-gc][bug] Fix signature canonicalization · 4d9d8518
      Manos Koukoutos authored
      We used not to emit canonical indexes for arrays and structs into
      WasmModule::signature_ids, which resulted in signature_ids not referring
      to the correct type indices in a WasmModule.
      
      Changes:
      - Rename signature_ids to canonical_type_ids.
      - Emit trivial canonical type ids for structs and arrays.
      - Add a test to catch the existing bug.
      - Improve DCHECKs for module type accessors.
      
      Bug: v8:7748
      Change-Id: I67ad58865e35b459b21db12557564b652035db75
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2444989
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70318}
      4d9d8518
  5. 01 Oct, 2020 1 commit
  6. 30 Sep, 2020 1 commit
  7. 29 Sep, 2020 1 commit
  8. 28 Sep, 2020 1 commit
    • Manos Koukoutos's avatar
      [wasm-gc] Initializer expressions can reference locally def. globals · df92d806
      Manos Koukoutos authored
      Changes:
      - Add current global index argument to consume_init_expr.
      - Inline DecodeGlobalInModule. Move the check for undefined global
        indexes into into consume_init_expr. Note: This fixes a bug where the
        index wasn't checked for nested global.get.
      - Under --experimental-wasm-gc, allow global initializers to reference
        already defined globals in the same module.
      - Rename ModuleDecoderImpl::DecodeInitExpr -> DecodeInitExprForTesting.
        Remove redundant "start" argument.
      - Add tests for global initializers. Remove a redundant test.
      
      Bug: v8:7748
      Change-Id: Ieb4a768f8cfdd423e5f439bb3467700068f240b7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2428596
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70181}
      df92d806
  9. 25 Sep, 2020 1 commit
  10. 24 Sep, 2020 2 commits
    • Manos Koukoutos's avatar
      [wasm-gc] Some cleanup and documentation · e241c6da
      Manos Koukoutos authored
      Changes:
      - Add dedicated exception for call_ref invoking a WasmJSFunction.
      - Small restructuring of read_value_type.
      - Change HeapType::kLastSentinel to point to the last valid type,
        update is_valid().
      - Remove redundant DCHECK from ValueType constructors.
      - Rename a few section-related macros in module-decoder-unittest.cc,
        add a small test.
      - Rename "Simd128" -> "s128" in error message.
      - Write some documentation, mostly in value-type.h and wasm-subtyping.h.
      
      Bug: v8:7748
      Change-Id: I4fc4826fbdeac50e21ef524787c2024d7aa1b3b2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424139
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70118}
      e241c6da
    • Clemens Backes's avatar
      [wasm][memory64] Start implementing the memory64 proposal · 18da0875
      Clemens Backes authored
      This is a first small step for implementing the memory64 proposal:
      1. Add a feature flag.
      2. Add the 0x04 and 0x05 limits flag for memory64.
      3. Read memory limits as LEB-encoded u64 (instead of u32) if a memory64
         limit flag was read.
      4. Unify {MaximumFlag} and {MemoryFlag}, which was used inconsistently
         before.
      5. Add test for memory limits encoded with >5 bytes.
      6. Move some macros from module-decoder-unittest.cc to wasm-macro-gen.h.
      
      Note that still the same limits for the maximum number of pages applies
      as before, i.e. you cannot specify a memory >4GB yet. But you can encode
      that small number in >5 bytes.
      
      R=manoskouk@chromium.org
      
      Bug: v8:10949
      Change-Id: I90a4f08426ae714a67440281785eb00cfc24a349
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2423712
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70110}
      18da0875
  11. 23 Sep, 2020 1 commit
  12. 21 Sep, 2020 2 commits
  13. 18 Sep, 2020 1 commit
    • Manos Koukoutos's avatar
      [wasm-gc] Preparation for typed function tables · a5f68abe
      Manos Koukoutos authored
      Changes:
      - Rename IsSignatureEqual -> MatchesSignature for consistency
      - Add WasmInstanceObject field to WasmTableObject.
      - Improve some error messages related to tables in
        function-body-decoder-impl.h.
      - Introduce WasmTable::IsValidTableType. Use it wherever appropriate.
      - Overload equality operators in HeapType to work with
        HeapType::Representation.
      - Rename DynamicTypeCheckRef -> TypecheckJSObject.
      - Handle WasmCapiFunctions in TypecheckJSObject.
      - Use TypecheckJSObject in WasmTableObject::IsValidElement.
      - A few more minor improvements.
      
      Bug: v8:9495
      Change-Id: I2867dd3486d7c31717ac26b87a50e15cf2b898be
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416491
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70001}
      a5f68abe
  14. 16 Sep, 2020 1 commit
    • Thibaud Michaud's avatar
      [wasm] Fix interpreter Ref in unreachable code · 140271f2
      Thibaud Michaud authored
      For "else" and "catch" statements, the Ref to the end label should only
      be added if the current block is unreachable, not the parent block.
      
      In the added regression test, the "true" block ends in an unreachable
      state with a stack height less than the target height of the end label.
      This is valid due to the semantics of unreachable code, but we should
      not add the Ref in this case because its stack height is invalid.
      
      R=clemensb@chromium.org
      
      Fixed: chromium:1092130
      Change-Id: Iebaf5e7d6516278ccd3c8268ac331069e109d882
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2412181
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69934}
      140271f2
  15. 11 Sep, 2020 1 commit
  16. 09 Sep, 2020 1 commit
  17. 17 Aug, 2020 1 commit
  18. 13 Aug, 2020 1 commit
  19. 10 Aug, 2020 1 commit
  20. 05 Aug, 2020 1 commit
    • Manos Koukoutos's avatar
      [wasm-gc] Allow reference types to function signatures · a61aaed9
      Manos Koukoutos authored
      Changes:
      - Remove restriction that function types cannot be used as ref types.
      - Introduce WasmModule::has_type().
      - Remove deferred signature checks in module-decoder. Instead, check if
        type indices are out of bounds in consume_value_type (was bugged
        before).
      - Remove obsolete GetCanonicalRttIndex.
      - Refine type of ref.func.
      - Statically check immediate type against table type for call_indirect.
      - Dynamic check for call_indirect should only happen when for funcref
        (currently the only function supertype).
      - Allocate a different map per function signature (with Map::Copy).
      - Introduce function type equivalence and (trivial) subtyping.
      - Add a few elementary tests.
      
      Bug: v8:7748
      Change-Id: If57d0bfd856c9eb3784191f3de423f53dfd26ef1
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335190
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69250}
      a61aaed9
  21. 04 Aug, 2020 2 commits
  22. 31 Jul, 2020 4 commits
  23. 30 Jul, 2020 1 commit
  24. 24 Jul, 2020 3 commits
  25. 21 Jul, 2020 2 commits
  26. 16 Jul, 2020 1 commit
  27. 10 Jul, 2020 2 commits
  28. 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
  29. 07 Jul, 2020 1 commit