1. 04 Feb, 2021 1 commit
  2. 29 Jan, 2021 1 commit
  3. 15 Jan, 2021 1 commit
  4. 08 Jan, 2021 1 commit
  5. 15 Dec, 2020 1 commit
  6. 03 Dec, 2020 1 commit
  7. 10 Sep, 2020 1 commit
  8. 27 Apr, 2020 1 commit
    • Clemens Backes's avatar
      [wasm][exn] Add test for manipulated prototype chain · 42bc23de
      Clemens Backes authored
      This adds a test which I suspected would fail, but luckily it doesn't.
      The idea is to catch a proper wasm exception in JS, then construct a new
      exception, but set the catched exception as the prototype. My suspicion
      was that we would still handle that new exception like a wasm exception,
      since the `WasmExceptionGetTag` and `WasmExceptionGetValues` runtime
      functions to a standard property lookup, which includes a prototype
      walk.
      Interestingly, the prototype walk is already skipped automatically when
      loading private symbols, so the implementation already supports this
      case correctly.
      Let's still add this test to have coverage for this case.
      
      R=jkummerow@chromium.org
      CC=aheejin@chromium.org
      
      Bug: v8:8091
      Change-Id: Idf9944cf47f96cca38e9678e9200bf03a39ea126
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2167438Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67391}
      42bc23de
  9. 23 Mar, 2020 1 commit
  10. 08 Oct, 2019 1 commit
  11. 15 Jul, 2019 1 commit
  12. 30 Jan, 2019 1 commit
  13. 15 Jan, 2019 1 commit
  14. 10 Dec, 2018 1 commit
  15. 09 Oct, 2018 2 commits
    • Michael Starzinger's avatar
      [wasm] Add support for multiple catch blocks. · 2e007737
      Michael Starzinger authored
      This adds support for multiple catch blocks being attached to a single
      try block. The implemented semantics are that type checks are performed
      in order from top to bottom.
      
      Note that multiple catch blocks of the same type are not prohibited and
      will be accepted, making the second such block essentially unreachable.
      The current proposal neither explicitly allows nor prohibits it.
      
      R=clemensh@chromium.org
      TEST=mjsunit/wasm/exceptions
      BUG=v8:8091
      
      Change-Id: I31e7a07a7cffdd909a58342e00f05e52ed1a3182
      Reviewed-on: https://chromium-review.googlesource.com/c/1270591Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56478}
      2e007737
    • Michael Starzinger's avatar
      [wasm] Initial catch-all control flow wiring. · d56e29d1
      Michael Starzinger authored
      This adds support to wire control flow of catch-all expressions into an
      existing try-catch cascade. Note that multiple typed catch blocks are
      not yet supported, only one typed catch block followed by one catch-all
      block is supported.
      
      In case the explicit catch-all block is missing, we emulate the correct
      semantics by internally always emitting a catch-all containing a simple
      rethrow instruction.
      
      R=clemensh@chromium.org
      TEST=mjsunit/wasm/exceptions-catchall
      BUG=v8:8091
      
      Change-Id: I6b29a98c4f1a558fabe6012f4ba6c7b7d43529bb
      Reviewed-on: https://chromium-review.googlesource.com/c/1270585Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56476}
      d56e29d1
  16. 17 Sep, 2018 4 commits
  17. 04 Sep, 2018 3 commits
  18. 30 Aug, 2018 1 commit
    • Michael Starzinger's avatar
      [wasm] Add support for 'except_ref' value type. · f19a7068
      Michael Starzinger authored
      This adds experimental support for an 'except_ref' value type for caught
      exceptions as per the exception handling proposal. In the current for it
      is only allowed to have such types in the stack or in a local, support
      for having it as part of any signature was left out.
      
      The default value for a local of type 'except_ref' is the 'ref_null'
      value for now. Since this value cannot escape a wasm function, the
      concrete value is not actually observable.
      
      R=ahaas@chromium.org
      TEST=unittests/LocalDeclDecoderTest.ExceptRef,mjsunit/wasm/exceptions
      BUG=v8:8091
      
      Change-Id: I7bd65274327a833262f8749cbe0e24e737f6e0c1
      Reviewed-on: https://chromium-review.googlesource.com/1196510Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55526}
      f19a7068
  19. 29 Aug, 2018 1 commit
  20. 28 Aug, 2018 2 commits
  21. 25 Sep, 2017 1 commit
    • Karl Schimpf's avatar
      Add capability of throwing values in WASM · 49106e48
      Karl Schimpf authored
      This is a second attempt at landing CL 644866 which was reverted by
      CL 667019.
      
      Extends the current implementation of WASM exceptions to be able to
      throw exceptions with values (not just tags).
      
      A JS typed (uint_16) array is used to hold the thrown values. This
      allows all WASM types to be stored (i32, i64, f32, and f64) as well as
      be inspected in JS.
      
      The previous CL was reverted because the WASM compiler made calls to
      run time functions with tagged objects, which must not be done. To fix
      this, all run time calls use the thread-level isolate to hold the
      exception being processed.
      
      Bug: v8:6577
      Change-Id: I4b1ef7e2847b71a2fab8e9934a0531057db9de63
      Reviewed-on: https://chromium-review.googlesource.com/677056
      Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarEric Holk <eholk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48148}
      49106e48
  22. 15 Sep, 2017 1 commit
  23. 13 Sep, 2017 1 commit
  24. 29 Aug, 2017 4 commits
    • Clemens Hammacher's avatar
      [wasm] Fix throwing and catching exceptions · 9ee7e4ec
      Clemens Hammacher authored
      This reimplements functionality that was present before the decoder
      refactoring. It's implemented a bit differently though by generating
      the code for re-throwing an uncaught exception earlier (when generating
      code for the catch).
      
      R=titzer@chromium.org, kschimpf@chromium.org
      
      Bug: v8:6600
      Change-Id: Ie2f11837851c0602ab31506fa63475fc2d0b5047
      Reviewed-on: https://chromium-review.googlesource.com/641550
      Commit-Queue: Brad Nelson <bradnelson@chromium.org>
      Reviewed-by: 's avatarBrad Nelson <bradnelson@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47687}
      9ee7e4ec
    • Clemens Hammacher's avatar
      Reland "[wasm] Refactor function body decoder" · 54040fff
      Clemens Hammacher authored
      This is a reland of 6b4dc039
      Original change's description:
      > [wasm] Refactor function body decoder
      > 
      > This refactoring separates graph building from wasm decoding. The
      > WasmGraphBuilder is just a consumer of the decoded information.
      > Decoding without any consumer (i.e. just validation) gets 16% faster by
      > this refactoring, because no TFNode* have to be stored in the value
      > stack, and all dynamic tests to determine whether the graph should be
      > build are gone (measured on AngryBots; before: 110.2 +- 3.3ms, after:
      > 92.2 +- 3.1 ms).
      > 
      > This new design will allow us to also attach other consumers, e.g. a
      > new baseline compiler.
      > 
      > R=titzer@chromium.org
      > 
      > Bug: v8:6600
      > Change-Id: I4b60f2409d871a16c3c52a37e515bcfb9dbb8f54
      > Reviewed-on: https://chromium-review.googlesource.com/571010
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47671}
      
      TBR=titzer@chromium.org
      
      Bug: v8:6600
      Change-Id: Idd867c5a1917437de5b6e3de5917cc1c9f194489
      Reviewed-on: https://chromium-review.googlesource.com/640591Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47678}
      54040fff
    • Clemens Hammacher's avatar
      Revert "[wasm] Refactor function body decoder" · 425ede39
      Clemens Hammacher authored
      This reverts commit 6b4dc039.
      
      Reason for revert: Mips build failure: https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/11749
      
      Original change's description:
      > [wasm] Refactor function body decoder
      > 
      > This refactoring separates graph building from wasm decoding. The
      > WasmGraphBuilder is just a consumer of the decoded information.
      > Decoding without any consumer (i.e. just validation) gets 16% faster by
      > this refactoring, because no TFNode* have to be stored in the value
      > stack, and all dynamic tests to determine whether the graph should be
      > build are gone (measured on AngryBots; before: 110.2 +- 3.3ms, after:
      > 92.2 +- 3.1 ms).
      > 
      > This new design will allow us to also attach other consumers, e.g. a
      > new baseline compiler.
      > 
      > R=​titzer@chromium.org
      > 
      > Bug: v8:6600
      > Change-Id: I4b60f2409d871a16c3c52a37e515bcfb9dbb8f54
      > Reviewed-on: https://chromium-review.googlesource.com/571010
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47671}
      
      TBR=titzer@chromium.org,clemensh@chromium.org
      
      Change-Id: I76a50e355f0390cc53a2da4ceedd8830ca20a9c6
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6600
      Reviewed-on: https://chromium-review.googlesource.com/640870Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47672}
      425ede39
    • Clemens Hammacher's avatar
      [wasm] Refactor function body decoder · 6b4dc039
      Clemens Hammacher authored
      This refactoring separates graph building from wasm decoding. The
      WasmGraphBuilder is just a consumer of the decoded information.
      Decoding without any consumer (i.e. just validation) gets 16% faster by
      this refactoring, because no TFNode* have to be stored in the value
      stack, and all dynamic tests to determine whether the graph should be
      build are gone (measured on AngryBots; before: 110.2 +- 3.3ms, after:
      92.2 +- 3.1 ms).
      
      This new design will allow us to also attach other consumers, e.g. a
      new baseline compiler.
      
      R=titzer@chromium.org
      
      Bug: v8:6600
      Change-Id: I4b60f2409d871a16c3c52a37e515bcfb9dbb8f54
      Reviewed-on: https://chromium-review.googlesource.com/571010
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47671}
      6b4dc039
  25. 02 Aug, 2017 3 commits
    • Karl Schimpf's avatar
      Reland "Start migration of try/throw/catch to match proposal." · ad49b7b4
      Karl Schimpf authored
      This is a reland of 470a1001
      Original change's description:
      > Start migration of try/throw/catch to match proposal.
      > 
      > This CL does the first baby steps on moving the current (experimental)
      > exception handling to match that of the WebAssembly proposal.
      > 
      > It does the following:
      > 
      > 1) Use exception tags instead of integers.
      > 
      > 2) Only handle empty exception signatures (i.e. no values associated
      >    with the exception tag.
      > 
      > 3) Only handle one catch clause.
      > 
      > 4) Be sure to rethrow the exception if the exception tag does not match.
      > 
      > Note: There are many things that need to be fixed, and are too
      > numerous to list here. However, the code should have TODO's on each
      > missing parts of the implementation.
      > 
      > Also note that the code currently doesn't handle nested catch blocks,
      > nor does it change the throw value being an integer. Rather, the
      > integer value is still being thrown, and currently is the exception
      > tag. Therefore, we don't build an exception object. This is the reason
      > why this CL doesn't handle exceptions that pass values.
      > 
      > Also, the current implementation still can't handle multiple modules
      > because tag resolution (between) modules has not be implemented yet.
      > 
      > Bug: v8:6577
      > Change-Id: Id6d08b641b3c42d1eec7d4db582f2dab35406114
      > Reviewed-on: https://chromium-review.googlesource.com/591910
      > Reviewed-by: Brad Nelson <bradnelson@chromium.org>
      > Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47087}
      
      Bug: v8:6577
      Change-Id: I41c3309827c292cb787681a95aaef7cf9b931835
      Reviewed-on: https://chromium-review.googlesource.com/598968Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarBrad Nelson <bradnelson@chromium.org>
      Commit-Queue: Brad Nelson <bradnelson@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47100}
      ad49b7b4
    • Ulan Degenbaev's avatar
      Revert "Start migration of try/throw/catch to match proposal." · 41daf8a5
      Ulan Degenbaev authored
      This reverts commit 470a1001.
      
      Reason for revert: GC stress bot failures.
      https://uberchromegw.corp.google.com/i/client.v8/builders/V8%20Mac%20GC%20Stress/builds/14522
      
      
      Original change's description:
      > Start migration of try/throw/catch to match proposal.
      > 
      > This CL does the first baby steps on moving the current (experimental)
      > exception handling to match that of the WebAssembly proposal.
      > 
      > It does the following:
      > 
      > 1) Use exception tags instead of integers.
      > 
      > 2) Only handle empty exception signatures (i.e. no values associated
      >    with the exception tag.
      > 
      > 3) Only handle one catch clause.
      > 
      > 4) Be sure to rethrow the exception if the exception tag does not match.
      > 
      > Note: There are many things that need to be fixed, and are too
      > numerous to list here. However, the code should have TODO's on each
      > missing parts of the implementation.
      > 
      > Also note that the code currently doesn't handle nested catch blocks,
      > nor does it change the throw value being an integer. Rather, the
      > integer value is still being thrown, and currently is the exception
      > tag. Therefore, we don't build an exception object. This is the reason
      > why this CL doesn't handle exceptions that pass values.
      > 
      > Also, the current implementation still can't handle multiple modules
      > because tag resolution (between) modules has not be implemented yet.
      > 
      > Bug: v8:6577
      > Change-Id: Id6d08b641b3c42d1eec7d4db582f2dab35406114
      > Reviewed-on: https://chromium-review.googlesource.com/591910
      > Reviewed-by: Brad Nelson <bradnelson@chromium.org>
      > Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47087}
      
      TBR=bradnelson@chromium.org,eholk@chromium.org,kschimpf@chromium.org
      
      Change-Id: I01dc8c40cc1057333a988c1d275ce5f457b0cb64
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6577
      Reviewed-on: https://chromium-review.googlesource.com/598847Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47090}
      41daf8a5
    • Karl Schimpf's avatar
      Start migration of try/throw/catch to match proposal. · 470a1001
      Karl Schimpf authored
      This CL does the first baby steps on moving the current (experimental)
      exception handling to match that of the WebAssembly proposal.
      
      It does the following:
      
      1) Use exception tags instead of integers.
      
      2) Only handle empty exception signatures (i.e. no values associated
         with the exception tag.
      
      3) Only handle one catch clause.
      
      4) Be sure to rethrow the exception if the exception tag does not match.
      
      Note: There are many things that need to be fixed, and are too
      numerous to list here. However, the code should have TODO's on each
      missing parts of the implementation.
      
      Also note that the code currently doesn't handle nested catch blocks,
      nor does it change the throw value being an integer. Rather, the
      integer value is still being thrown, and currently is the exception
      tag. Therefore, we don't build an exception object. This is the reason
      why this CL doesn't handle exceptions that pass values.
      
      Also, the current implementation still can't handle multiple modules
      because tag resolution (between) modules has not be implemented yet.
      
      Bug: v8:6577
      Change-Id: Id6d08b641b3c42d1eec7d4db582f2dab35406114
      Reviewed-on: https://chromium-review.googlesource.com/591910Reviewed-by: 's avatarBrad Nelson <bradnelson@chromium.org>
      Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47087}
      470a1001
  26. 31 May, 2017 1 commit
    • Clemens Hammacher's avatar
      [wasm] Make prototype flags experimental · 45618a9a
      Clemens Hammacher authored
      Most prototype implementations are not fully supported in the
      interpreter. This is the case at least for exception handling, simd, and
      atomics. Any function can be redirected to the interpreter though,
      either by passing --wasm-interpret-all, or by dynamically redirecting to
      the interpreter for debugging.
      Making the flags experimental keeps the fuzzer from playing around with
      these flags.
      
      Drive-by: Refactor tests which explicitly set the prototype flag to use
      a new scope for that.
      
      R=ahaas@chromium.org
      BUG=chromium:727584
      
      Change-Id: I67da79f579f1ac93c67189afef40c6524bdd4430
      Reviewed-on: https://chromium-review.googlesource.com/519402
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45639}
      45618a9a
  27. 21 Dec, 2016 1 commit
  28. 20 Dec, 2016 1 commit