1. 09 Apr, 2018 1 commit
  2. 06 Apr, 2018 2 commits
    • Michael Achenbach's avatar
      Revert "[cleanup] Refactor the Factory" · 503e07c3
      Michael Achenbach authored
      This reverts commit f9a2e24b.
      
      Reason for revert: gc stress failures not all fixed by follow up.
      
      Original change's description:
      > [cleanup] Refactor the Factory
      > 
      > There is no good reason to have the meat of most objects' initialization
      > logic in heap.cc, all wrapped by the CALL_HEAP_FUNCTION macro. Instead,
      > this CL changes the protocol between Heap and Factory to be AllocateRaw,
      > and all object initialization work after (possibly retried) successful
      > raw allocation happens in the Factory.
      > 
      > This saves about 20KB of binary size on x64.
      > 
      > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      > Change-Id: Icbfdc4266d7be8b48d2fe085f03411743dc6a0ca
      > Reviewed-on: https://chromium-review.googlesource.com/959533
      > Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52416}
      
      TBR=jkummerow@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,hpayer@chromium.org
      
      Change-Id: Idbbc53478742f3e9525eee83342afc6aedae122f
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/999414Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52420}
      503e07c3
    • Jakob Kummerow's avatar
      [cleanup] Refactor the Factory · f9a2e24b
      Jakob Kummerow authored
      There is no good reason to have the meat of most objects' initialization
      logic in heap.cc, all wrapped by the CALL_HEAP_FUNCTION macro. Instead,
      this CL changes the protocol between Heap and Factory to be AllocateRaw,
      and all object initialization work after (possibly retried) successful
      raw allocation happens in the Factory.
      
      This saves about 20KB of binary size on x64.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: Icbfdc4266d7be8b48d2fe085f03411743dc6a0ca
      Reviewed-on: https://chromium-review.googlesource.com/959533
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52416}
      f9a2e24b
  3. 29 Jun, 2017 1 commit
    • Clemens Hammacher's avatar
      [wasm] Use pending exceptions consistently · d6aed443
      Clemens Hammacher authored
      In our internal code, we should only use pending exceptions. They will
      be converted to scheduled exceptions on the API boundary.
      Hence, the ErrorThrower just sets a pending exception; it should never
      have to think about scheduled exceptions. The new
      ScheduledErrorThrower inherits from ErrorThrower and reschedules any
      pending exceptions in its destructor (turning them into scheduled
      exceptions).
      In some situations, there might already be a scheduled exception, e.g.
      when calling other API methods (v8::Value::Get). In this case, the
      ErrorThrower should also not set another pending exception. For the
      reasons mentioned above, this can only be handled in the
      ScheduledErrorThrower, which is used the API methods.
      
      This fixes one DCHECK failure and one TODO about scheduled exceptions
      if no instance can be created, because the start function throws.
      
      R=mtrofin@chromium.org, mstarzinger@chromium.org
      BUG=v8:6232,chromium:736256
      
      Change-Id: I4905be04c565df9495de18fb26adbb5c05d193d2
      Reviewed-on: https://chromium-review.googlesource.com/548641
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46314}
      d6aed443
  4. 26 Jun, 2017 1 commit
  5. 02 May, 2017 2 commits
  6. 30 Apr, 2017 1 commit
    • Clemens Hammacher's avatar
      [wasm] Refactor and fix ErrorThrower · e3207836
      Clemens Hammacher authored
      The error thrower did allocate the exception at the moment the error was
      detected. For async compilation, this meant in another step than when
      it was actually thrown. Since the HandleScope of the exception already
      died at that point, this would have lead to memory errors.
      
      With this refactoring, we only store the information needed to generate
      the exception in the ErrorThrower, and only generate the exception
      object once it is actually needed.
      
      With regression test.
      
      R=ahaas@chromium.org, mtrofin@chromium.org
      Also-by: ahaas@chromium.org
      
      Change-Id: Iffcab1f8d1cf5925e3643fcf0729ba9a84c7d277
      Reviewed-on: https://chromium-review.googlesource.com/490085
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45000}
      e3207836
  7. 28 Apr, 2017 1 commit
  8. 10 Apr, 2017 1 commit
    • Clemens Hammacher's avatar
      [wasm] Refactor wasm::Result type · d50ebde7
      Clemens Hammacher authored
      - Store std::string instead of std::unique_ptr<char[]> for the error
        message.
      - Remove ErrorCode, which was just kSuccess and kError anyway. Error is
        now detected on whether error_msg_ is empty or not.
      - Refactor constructors for perfect forwarding; this will allow us to
        implement Result<std::unique_ptr<X*>>.
      - Refactor Decoder::toResult for perfect forwarding.
      - Remove output operators (operator<<) for Result; it was only used in
        the error case anyway. Print error message directly instead.
        The operator was problematic since it assumed the existence of an
        output operator for every T which is used in Result<T>.
      - Remove ModuleError and FunctionError, introduce general static
        Result<T>::Error method instead.
      
      R=ahaas@chromium.org
      
      Change-Id: I1e0f602a61ee9780fee2a3ed33147d431fb092ba
      Reviewed-on: https://chromium-review.googlesource.com/472748
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44518}
      d50ebde7
  9. 20 Jan, 2017 1 commit
  10. 16 Dec, 2016 1 commit
  11. 13 Oct, 2016 1 commit
  12. 21 Sep, 2016 1 commit
  13. 21 Jun, 2016 1 commit
    • rossberg's avatar
      Upgrade Wasm JS API, step 1 · 386c747b
      rossberg authored
      Implements:
      - WebAssembly object,
      - WebAssembly.Module constructor,
      - WebAssembly.Instance constructor,
      - WebAssembly.compile async method,
      - and Module and Instance instance objects.
      
      Also, changes ErrorThrower to support capturing errors in a promise reject.
      
      Since we cannot yet compile without fixing the Wasm memory, and cannot validate a module without compiling, the Module constructor and compile method don't do anything yet but checking that their argument is a suitable BufferSource. Instead of a compiled module, the hidden state of a Module object currently is just that buffer.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2084573002
      Cr-Commit-Position: refs/heads/master@{#37143}
      386c747b
  14. 14 Jun, 2016 1 commit
  15. 25 May, 2016 1 commit
  16. 11 May, 2016 1 commit
  17. 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