1. 12 Jun, 2020 1 commit
  2. 08 Oct, 2019 1 commit
  3. 07 Feb, 2019 1 commit
    • Clemens Hammacher's avatar
      [wasm] Check that sync and async errors match · 7a8cd551
      Clemens Hammacher authored
      This makes the existing error message tests also test the error
      produced by asynchronous compilation and instantiation.
      It also slightly tweaks the error message to contain the name of the
      API function invoked instead of "WebAssembly Instantiation".
      
      R=titzer@chromium.org
      
      Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
      Bug: chromium:926311
      Change-Id: If4ab963cee8267d43b289169d21b31637c471d6d
      Reviewed-on: https://chromium-review.googlesource.com/c/1456085
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59442}
      7a8cd551
  4. 06 Feb, 2019 1 commit
  5. 30 Jan, 2019 1 commit
  6. 07 Aug, 2018 1 commit
    • Andreas Haas's avatar
      [wasm] During instantiation, pending_exceptions dominate new exceptions · 5f105141
      Andreas Haas authored
      For async instantiation of WebAssembly code we had the assumption that
      a pending exceptions (an exception which comes from
      execution JS code) and an ErrorThrower error cannot occur at the same
      time. This assumption turned out to be wrong. With this CL we handle
      this case by prefering pending_exceptions over ErrorThrower errors.
      
      In addition I extended the tests for failing instantiation to also
      exercise async instantiation, and I added a regression test.
      
      R=clemensh@chromium.org
      
      Bug: chromium:870646
      Change-Id: I4cb54ff8642ad4ea193b20f79905c9f6508c2b2e
      Reviewed-on: https://chromium-review.googlesource.com/1163511Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54940}
      5f105141
  7. 16 Oct, 2017 1 commit
  8. 15 Mar, 2017 2 commits
    • Clemens Hammacher's avatar
      [wasm] Fix wasm to js wrapper on ia32 for i64 return · 69da6fcd
      Clemens Hammacher authored
      When generating the code for an illegal (non-js-compliant) wrapper for
      a js function, we were generating a zero constant of the return type.
      This failed on ia32 if the return type is i64.
      The correct thing to do is to return two i32 zero constants.
      
      R=titzer@chromium.org
      BUG=v8:6104, v8:6096
      
      Change-Id: Idc0dd8d3eef901c22d5278d97f1879b000a18588
      Reviewed-on: https://chromium-review.googlesource.com/455857Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#43835}
      69da6fcd
    • Clemens Hammacher's avatar
      [wasm] Fix wasm to js wrapper for illegal signature · 3e6873ab
      Clemens Hammacher authored
      When compiling a wasm to js wrapper for a signature which is not JS
      compatible, we generate a runtime call to throw a type error and return
      immediately afterwards. We were using the return value of the runtime
      call as return value for the wrapper.
      This worked for integer return values, since the same registers are
      used for tagged values and integer values. For float values, however,
      it failed, since the return value needs to be stored in another
      register.
      
      R=titzer@chromium.org
      BUG=v8:6096
      
      Change-Id: I8f39ea132cd150c3044673d25fa3c3588b4266bf
      Reviewed-on: https://chromium-review.googlesource.com/455816Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#43821}
      3e6873ab
  9. 20 Dec, 2016 1 commit
  10. 07 Dec, 2016 1 commit
    • clemensh's avatar
      [wasm] Fix ToNumber conversion · ae1c5746
      clemensh authored
      There were two bugs, one partly hiding the other one:
      1) We generate the ToNumber conversion for each WASM_TO_JS wrapper,
         even if the expected return type is void.
      2) The return node in the WASM_TO_JS wrapper did not use the effect of
         the ToNumber conversion.
      
      This CL fixes both, and adds test cases to check that we do throw an
      error trying to convert (e.g.) Symbol to a number, but only if the
      return type is not void.
      Additional test check that a user-provided valueOf method is actually
      called the correct number of times.
      
      R=titzer@chromium.org, bradnelson@chromium.org
      BUG=v8:4203
      
      Review-Url: https://codereview.chromium.org/2552123004
      Cr-Commit-Position: refs/heads/master@{#41552}
      ae1c5746
  11. 27 Sep, 2016 1 commit
    • titzer's avatar
      [wasm] Master CL for Binary 0xC changes. · 28392ab1
      titzer authored
      [0xC] Convert to stack machine semantics.
      [0xC] Use section codes instead of names.
      [0xC] Add elements section decoding.
      [0xC] Decoding of globals section.
      [0xC] Decoding of memory section.
      [0xC] Decoding of imports section.
      [0xC] Decoding of exports section.
      [0xC] Decoding of data section.
      [0xC] Remove CallImport bytecode.
      [0xC] Function bodies have an implicit block.
      [0xC] Remove the bottom label from loops.
      [0xC] Add signatures to blocks.
      [0xC] Remove arities from branches.
      Add tests for init expression decoding.
      Rework compilation of import wrappers and how they are patched.
      Rework function indices in debugging.
      Fix ASM->WASM builder for stack machine.
      Reorganize asm.js foreign functions due to import indices change.
      
      R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
      BUG=chromium:575167
      LOG=Y
      
      Committed: https://crrev.com/76eb976a67273b8c03c744f64ad850b0432554b9
      Review-Url: https://codereview.chromium.org/2345593003
      Cr-Original-Commit-Position: refs/heads/master@{#39678}
      Cr-Commit-Position: refs/heads/master@{#39795}
      28392ab1
  12. 23 Sep, 2016 2 commits
    • machenbach's avatar
      Revert of [wasm] Master CL for Binary 0xC changes. (patchset #26 id:490001 of... · e1eee748
      machenbach authored
      Revert of [wasm] Master CL for Binary 0xC changes. (patchset #26 id:490001 of https://codereview.chromium.org/2345593003/ )
      
      Reason for revert:
      Main suspect for tsan:
      https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/11893
      
      Also changes layout tests:
      https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10036
      
      +mips builder:
      https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/4032
      
      Original issue's description:
      > [wasm] Master CL for Binary 0xC changes.
      >
      > [0xC] Convert to stack machine semantics.
      > [0xC] Use section codes instead of names.
      > [0xC] Add elements section decoding.
      > [0xC] Decoding of globals section.
      > [0xC] Decoding of memory section.
      > [0xC] Decoding of imports section.
      > [0xC] Decoding of exports section.
      > [0xC] Decoding of data section.
      > [0xC] Remove CallImport bytecode.
      > [0xC] Function bodies have an implicit block.
      > [0xC] Remove the bottom label from loops.
      > [0xC] Add signatures to blocks.
      > [0xC] Remove arities from branches.
      > Add tests for init expression decoding.
      > Rework compilation of import wrappers and how they are patched.
      > Rework function indices in debugging.
      > Fix ASM->WASM builder for stack machine.
      > Reorganize asm.js foreign functions due to import indices change.
      >
      > R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
      > BUG=chromium:575167
      > LOG=Y
      >
      > Committed: https://crrev.com/76eb976a67273b8c03c744f64ad850b0432554b9
      > Cr-Commit-Position: refs/heads/master@{#39678}
      
      TBR=ahaas@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org,rossberg@chromium.org,bradnelson@google.com,titzer@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=chromium:575167
      
      Review-Url: https://codereview.chromium.org/2361053004
      Cr-Commit-Position: refs/heads/master@{#39685}
      e1eee748
    • titzer's avatar
      [wasm] Master CL for Binary 0xC changes. · 76eb976a
      titzer authored
      [0xC] Convert to stack machine semantics.
      [0xC] Use section codes instead of names.
      [0xC] Add elements section decoding.
      [0xC] Decoding of globals section.
      [0xC] Decoding of memory section.
      [0xC] Decoding of imports section.
      [0xC] Decoding of exports section.
      [0xC] Decoding of data section.
      [0xC] Remove CallImport bytecode.
      [0xC] Function bodies have an implicit block.
      [0xC] Remove the bottom label from loops.
      [0xC] Add signatures to blocks.
      [0xC] Remove arities from branches.
      Add tests for init expression decoding.
      Rework compilation of import wrappers and how they are patched.
      Rework function indices in debugging.
      Fix ASM->WASM builder for stack machine.
      Reorganize asm.js foreign functions due to import indices change.
      
      R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
      BUG=chromium:575167
      LOG=Y
      
      Review-Url: https://codereview.chromium.org/2345593003
      Cr-Commit-Position: refs/heads/master@{#39678}
      76eb976a
  13. 21 Sep, 2016 1 commit
  14. 30 Aug, 2016 1 commit
  15. 18 Aug, 2016 1 commit
    • ahaas's avatar
      [wasm] Throw a type error if an I64 is exported to JS. · 92b7c728
      ahaas authored
      As required by the spec, ToJS now throws a TypeError fit I64 values
      instead of truncating the I64 value to I32. To throw a TypeError I
      introduced a new runtime function because the existing
      Runtime::kThrowWasmError does not throw a TypeError. Since we have calls
      to two runtime functions now, and an additional one is needed for stack
      checks, I extracted the call to runtime functions into a helper function.
      
      R=titzer@chromium.org
      
      TEST=mjsunit/wasm/ffi-error.js:I64InSignatureThrows
      
      Review-Url: https://codereview.chromium.org/2254803002
      Cr-Commit-Position: refs/heads/master@{#38718}
      92b7c728
  16. 29 Apr, 2016 2 commits
    • titzer's avatar
      [wasm] Binary 11: Bump module version to 0xB. · ee03b721
      titzer authored
      [wasm] Binary 11: Swap the order of section name / section length.
      [wasm] Binary 11: Shorter section names.
      [wasm] Binary 11: Add a prefix for function type declarations.
      [wasm] Binary 11: Function types encoded as pcount, p*, rcount, r*
      [wasm] Fix numeric names for functions.
      
      R=rossberg@chromium.org,jfb@chromium.org,ahaas@chromium.org
      BUG=chromium:575167
      LOG=Y
      
      Review-Url: https://codereview.chromium.org/1896863003
      Cr-Commit-Position: refs/heads/master@{#35897}
      ee03b721
    • titzer's avatar
      [wasm] Binary 11: WASM AST is now postorder. · 2aa4656e
      titzer authored
      [wasm] Binary 11: br_table takes a value.
      [wasm] Binary 11: Add implicit blocks to if arms.
      [wasm] Binary 11: Add arities to call, return, and breaks
      [wasm] Binary 11: Add experimental version.
      
      This CL changes the encoder, decoder, and tests to use a postorder
      encoding of the AST, which is more efficient in decode time and
      space.
      
      R=bradnelson@chromium.org,rossberg@chromium.org,binji@chromium.org
      BUG=chromium:575167
      LOG=Y
      
      Review-Url: https://codereview.chromium.org/1830663002
      Cr-Commit-Position: refs/heads/master@{#35896}
      2aa4656e
  17. 07 Mar, 2016 1 commit
  18. 03 Mar, 2016 1 commit
  19. 28 Feb, 2016 1 commit
  20. 12 Jan, 2016 1 commit
  21. 17 Dec, 2015 1 commit
  22. 11 Dec, 2015 1 commit
    • titzer's avatar
      Initial import of v8-native WASM. · 4c5b3609
      titzer authored
      As discussed in person, this adds the code from v8-native-prototype into
      V8 proper, guarded by GYP flags that do not build the code by default.
      Passing wasm=on to 'make' or setting v8_wasm as a GYP flag activates
      building of this code.
      
      An additional header file is added to and exported from the compiler
      directory, src/compiler/wasm-compiler.h. This exposes a limited interface
      with opaque Node and Graph types to the decoder to build TF graphs, as
      well as functions to compile WASM graphs.
      
      The mjsunit tests added are blacklisted because they fail without the
      WASM object exposed to JS, which is also disabled by the build config
      option.
      
      This corresponds closely to https://github.com/WebAssembly/v8-native-prototype/commit/5981e06ebc9b1e578831d03100f17ebb77970ee0, with some formatting fixes and moving some files into src/compiler.
      
      R=mstarzinger@chromium.org, bradnelson@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1504713014
      
      Cr-Commit-Position: refs/heads/master@{#32794}
      4c5b3609