1. 29 Jul, 2022 1 commit
    • Manos Koukoutos's avatar
      [wasm] Use isorecursive canonical types for call_indirect · 4f0ef8c3
      Manos Koukoutos authored
      Currently, we canonicalize types for call_indirect by looking in the
      current module for a signature of the same shape. This is not enough
      as of wasm-gc. Instead, the canonical identifier representing a type
      has to be computed via isorecursive canonicalization.
      This change is implemented behind a flag for now.
      Future work: Also integrate export wrappers with isorecursive
      canonical types. We need to store wrappers in instance-independent
      storage.
      
      Drive-by:
      - Always emit type check for call_indirect. We did not emit a check
        only when typed-function-references was enabled, but not gc. This
        is not something that will be possible long-term.
      - Fix some wasm cctests.
      
      Bug: v8:7748
      Change-Id: I7cced187009ac148c833dff5e720a8bb9a717e68
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3784600Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#82064}
      4f0ef8c3
  2. 01 Jul, 2022 2 commits
  3. 09 Jun, 2022 1 commit
  4. 02 Jun, 2022 1 commit
  5. 11 May, 2022 1 commit
  6. 22 Apr, 2022 1 commit
  7. 31 Jan, 2022 1 commit
  8. 19 Jan, 2022 1 commit
    • Manos Koukoutos's avatar
      Reland "[wasm] Various small cleanups/fixes" · 069d62eb
      Manos Koukoutos authored
      This is a reland of f1c2a208
      
      Changes compared to original:
      Revert test change which used simd and caused problems in multiple test
      configurations.
      
      Original change's description:
      > [wasm] Various small cleanups/fixes
      >
      > Changes:
      > - Fix a bug in objects-printer where array elements were not treated as
      >   tagged pointers.
      > - Fix a few TODOs, mainly in the wasm interpreter.
      > - Improve documentation, small refactorings.
      >
      > Change-Id: I1d70ad454b3a0693b9b784b17395434d81d01b61
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3383136
      > Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78656}
      
      Change-Id: I91f4fed5fbc91acb8b42413a6f40a8202bd43096
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398111Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78677}
      069d62eb
  9. 18 Jan, 2022 1 commit
    • Maya Lekova's avatar
      Revert "[wasm] Various small cleanups/fixes" · b1e12d70
      Maya Lekova authored
      This reverts commit f1c2a208.
      
      Reason for revert: Breaks some tests on no-sse configuration, please see https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux/45243/overview
      
      Original change's description:
      > [wasm] Various small cleanups/fixes
      >
      > Changes:
      > - Fix a bug in objects-printer where array elements were not treated as
      >   tagged pointers.
      > - Fix a few TODOs, mainly in the wasm interpreter.
      > - Improve documentation, small refactorings.
      >
      > Change-Id: I1d70ad454b3a0693b9b784b17395434d81d01b61
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3383136
      > Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78656}
      
      Change-Id: Ic698177259bb14b4c251a4212c79cc0d945b07f8
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398109
      Auto-Submit: Maya Lekova <mslekova@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Owners-Override: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78657}
      b1e12d70
  10. 17 Jan, 2022 1 commit
  11. 11 Jan, 2022 1 commit
  12. 24 Nov, 2021 1 commit
    • Manos Koukoutos's avatar
      [wasm] Internal representation for function references · f60132e9
      Manos Koukoutos authored
      Design doc: bit.ly/3jEVgzz
      
      We separate the internal representation of function references in Wasm
      from their JSFunction-based (external) representation. This improves
      performance of call_ref by requiring less indirections to load the
      context and call target from a function reference. In the boundary
      between wasm and JS/the C API, we add transformations between the two
      representations.
      
      Detailed changes:
      - Introduce WasmInternalFunction, containing fields required by
        call_ref, as well as a reference to the corresponding
        WasmExternalFunction. Add a reference to the WasmInternalFunction in
        WasmFunctionData. The {WasmInternalFunction::FromExternal} helper
        extracts the internal out of an external function.
      - Change {WasmInstanceObject::external_functions()} to internal
        functions.
      - Change wasm function tables to contain internal functions.
      - Change the following code to use internal functions:
        - call_ref in liftoff and Turbofan
        - function type checks in liftoff and Turbofan
        - CallRefIC and GenericJSToWasmWrapper builtins
        - {InitExprInterface::RefFunc}
        - module-compiler.cc in {ProcessTypeFeedback}
        - In module-instantiate.cc, in function-rtt creation.
      - Add transformations between internal and external functions in:
        - WasmWrapperGraphBuilder::{ToJS, BuildUnpackObjectWrapper, FromJS,
          BuildJSToJSWrapper}.
        - debug-wasm-objects.cc in {FunctionProxy::Get},
          {WasmValueObject::New} and {AddWasmTableObjectInternalProperties}.
        - runtime-wasm.cc in ReplaceWrapper
        - the C and JS APIs
        - module-instantiate.cc, in import and export processing, as well as
          {InitializeIndirectFunctionTables}
        - WasmTableObject::{IsValidElement, SetFunctionTableEntry}
        - {WasmGlobalObject::SetFuncRef}
      - Simplify body descriptors of WasmExternalFunction variants.
      - Adjust tests.
      
      Bug: v8:11510
      
      Change-Id: I8377f46f55c3771391ae1c5c8201a83854ee7878
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3277878Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78068}
      f60132e9
  13. 16 Nov, 2021 1 commit
  14. 08 Nov, 2021 1 commit
  15. 28 Oct, 2021 1 commit
  16. 21 Oct, 2021 1 commit
    • Ng Zhi An's avatar
      [wasm-relaxed-simd][x64] Prototype relaxed min and max · c3f346b7
      Ng Zhi An authored
      Relaxed f32x4 and f64x2 min and max.
      
      These instructions only guarantee results when the inputs are non nans,
      and when the inputs are not 0s of opposite signs.
      
      Reuse existing float binop testing harnesses and add special checks for
      such constants when relaxed operations are being tested.
      
      Drive-by rename of x64 instruction codes to be Minps/Maxps/Minpd/Maxpd
      since they map down exactly to a single instruction.
      
      Bug: v8:12284
      Change-Id: I1449dbfa87935a96d7d260db22667ab7b9e86601
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3218196Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#77484}
      c3f346b7
  17. 14 Oct, 2021 1 commit
  18. 11 Oct, 2021 1 commit
  19. 07 Oct, 2021 1 commit
  20. 28 Sep, 2021 1 commit
  21. 27 Sep, 2021 1 commit
  22. 20 Sep, 2021 1 commit
  23. 17 Sep, 2021 1 commit
    • Thibaud Michaud's avatar
      [wasm][eh] Fix interpreter delegate in catch block · 159e440d
      Thibaud Michaud authored
      The recent change in the delegate semantics was incorrectly implemented
      in the interpreter. It only checked that the first opcode of the target
      block is a 'try': we also need to skip try blocks when we are already in
      their 'catch' or 'catch_all' sub-block.
      Use the exception_stack instead, since it already only contains indices
      of try blocks that haven't reached their handlers yet.
      
      R=clemensb@chromium.org
      
      Bug: chromium:1249306
      Change-Id: I15746b4bfabf3dcf04cfe0f2ad438c573cce65e7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3168622
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76919}
      159e440d
  24. 13 Sep, 2021 1 commit
  25. 08 Sep, 2021 1 commit
  26. 12 Aug, 2021 1 commit
  27. 03 Aug, 2021 1 commit
  28. 29 Jul, 2021 1 commit
  29. 27 Jul, 2021 1 commit
  30. 26 Jul, 2021 1 commit
  31. 07 Jul, 2021 1 commit
    • Manos Koukoutos's avatar
      [fuzzer] Add support for reference types and simd · 52acb3d2
      Manos Koukoutos authored
      Changes:
      - Add reference types and simd to GetValueType().
      - Generalize BlockScope to handle reference types. Add EmitValueType()
        to WasmFunctionBuilder.
      - Constrain local_op and global_op to non-simd numeric types.
      - Add GenerateOneOf() for functions that need a heap type. Add
        GenerateOptRef(). Add ref_null, get_local_opt_ref as options for
        GenerateOptRef().
      - Remove the numeric conversion logic from ConsumeAndGenerate.
      
      Bug: v8:11954
      Change-Id: Idebae4a537326bdc03ac2f5e9c69a519f196938c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009456
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75614}
      52acb3d2
  32. 01 Jul, 2021 1 commit
  33. 24 Jun, 2021 1 commit
  34. 14 Jun, 2021 2 commits
  35. 10 Jun, 2021 1 commit
  36. 04 Jun, 2021 1 commit
    • 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
  37. 31 May, 2021 1 commit
  38. 03 May, 2021 1 commit