1. 19 Oct, 2016 1 commit
  2. 12 Oct, 2016 1 commit
    • clemensh's avatar
      [wasm] Provide better stack traces for asm.js code · 5d9fa102
      clemensh authored
      For the asm.js to WASM pipeline, the current stack traces only show
      low-level WASM information.
      This CL maps this back to asm.js source positions.
      It does so by attaching the asm.js source Script to the compiled WASM
      module, and emitting a delta-encoded table which maps from WASM byte
      offsets to positions within that Script. As asm.js code does not throw
      exceptions, we only store a mapping for call instructions.
      
      The new AsmJsWasmStackFrame implementation inherits from
      WasmStackFrame, but contains the logic to provide the source script and
      the position inside of it.
      What is still missing is the JSFunction object returned by
      CallSite.getFunction(). We currently return null.
      
      R=jgruber@chromium.org, titzer@chromium.org
      BUG=v8:4203
      
      Review-Url: https://codereview.chromium.org/2404253002
      Cr-Commit-Position: refs/heads/master@{#40205}
      5d9fa102
  3. 28 Sep, 2016 1 commit
  4. 26 Sep, 2016 1 commit
    • adamk's avatar
      [modules] Detect and throw exceptions for cyclic dependencies · b48eb569
      adamk authored
      Use an unordered_map<Module, unordered_set<String>> to keep track
      of visited Module/ExportName pairs during ResolveExport.
      
      This required adding a Hash() method to Module, which is accomplished
      by allocating a Symbol and storing it in the SharedFunctionInfo::name
      slot, then delegating the hash to that Symbol.
      
      Also added a helper method Module::shared() to easily get ahold of
      the SharedFunctionInfo and call it in the appropriate places instead
      of re-doing the ternary operator.
      
      BUG=v8:1569
      
      Review-Url: https://codereview.chromium.org/2367623004
      Cr-Commit-Position: refs/heads/master@{#39743}
      b48eb569
  5. 24 Sep, 2016 1 commit
  6. 23 Sep, 2016 3 commits
  7. 06 Sep, 2016 1 commit
    • jbroman's avatar
      Handle errors in v8::ValueDeserializer by throwing exceptions. · 5a97e955
      jbroman authored
      This restores the contract that all API methods that return Maybe<T> or
      MaybeLocal<T> always throw an exception when they return nothing.
      
      Since v8::ValueDeserializer::ReadHeader can now throw exceptions, it
      needs a Local<Context> parameter so that it can set up execution state
      (entering the context, etc.). The old method has been marked for
      deprecation, but since this API is experimental I intend to remove it
      as soon as I've removed the use from Blink.
      
      value-serializer-unittest has been updated to expect an exception in
      all decode failure cases.
      
      BUG=chromium:148757,chromium:641964
      
      Review-Url: https://codereview.chromium.org/2308053002
      Cr-Commit-Position: refs/heads/master@{#39188}
      5a97e955
  8. 05 Sep, 2016 1 commit
  9. 02 Sep, 2016 1 commit
  10. 01 Sep, 2016 3 commits
  11. 31 Aug, 2016 1 commit
  12. 30 Aug, 2016 1 commit
    • jgruber's avatar
      Refactor call site handling for stack formatting · f7bc1fc7
      jgruber authored
      This commit introduces several new types:
      
      * JSStackFrame and WasmStackFrame are wrapper classes around a single frame
        in a FrameArray.
      * They both inherit from StackFrameBase, which uses virtual dispatch to call
        the correct implementation.
      * FrameArrayIterator contains a static instance of JSStackFrame and
        WasmStackFrame and returns a pointer to the corresponding type for each
        frame.
      * The JS callsite object now contains the frame array and frame index
        as internal fields.
      
      Internal stack formatting now relies completely on FrameArrayIterator and the
      {JS,Wasm}StackFrame types. JS callsite instances are allocated only for custom
      user formatting through Error.prepareStackTrace.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2275233002
      Cr-Commit-Position: refs/heads/master@{#39015}
      f7bc1fc7
  13. 18 Aug, 2016 2 commits
    • 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
    • jgruber's avatar
      Revert of Use a custom Struct for stack trace storage (patchset #4 id:60001 of... · 6b7493a4
      jgruber authored
      Revert of Use a custom Struct for stack trace storage (patchset #4 id:60001 of https://codereview.chromium.org/2230953002/ )
      
      Reason for revert:
      Performance regressions in Gameboy, Life, CodeLoad and others. See crbug.com/638210.
      
      Original issue's description:
      > Refactor data structures for simple stack traces
      >
      > Simple stack traces are captured through Isolate::CaptureSimpleStackTrace.
      > Captured frames are stored in a FixedArray, which in turn is stored as a
      > property (using a private symbol) on the error object itself. Actual formatting
      > of the textual stack trace is done lazily when the user reads the stack
      > property of the error object.
      >
      > This would involve many conversions back and forth between index-encoded raw
      > data (receiver, function, offset and code), JS CallSite objects, and C++
      > CallSite objects.
      >
      > This commit refactors the C++ CallSite class into a Struct class called
      > StackTraceFrame, which is the new single point of truth frame information.
      > Isolate::CaptureSimpleStackTrace stores an array of StackTraceFrames, and JS
      > CallSite objects (now created only when the user specifies custom stack trace
      > formatting through Error.prepareStackTrace) internally only store a reference
      > to a StackTraceFrame.
      >
      > BUG=
      >
      > Committed: https://crrev.com/b4c1aefb9c369f1a33a6ca94a5de9b06ea4bf5c4
      > Cr-Commit-Position: refs/heads/master@{#38645}
      
      TBR=yangguo@chromium.org
      # Not skipping CQ checks because original CL landed more than 1 days ago.
      BUG=
      
      Review-Url: https://codereview.chromium.org/2252783007
      Cr-Commit-Position: refs/heads/master@{#38700}
      6b7493a4
  14. 17 Aug, 2016 1 commit
    • bakkot's avatar
      Reland of Amend DataView, ArrayBuffer, and TypedArray methods to use ToIndex.... · a3c13435
      bakkot authored
      Reland of Amend DataView, ArrayBuffer, and TypedArray methods to use ToIndex. (patchset #2 id:170001 of https://codereview.chromium.org/2113593002/ )
      
      Reason for revert:
      WebGL tests have been updated and rolled (at https://codereview.chromium.org/2227023002), so this should no longer fail outdated tests.
      
      Original issue's description:
      > Revert of Amend DataView, ArrayBuffer, and TypedArray methods to use ToIndex. (patchset #8 id:140001 of https://codereview.chromium.org/2090353003/ )
      >
      > Reason for revert:
      > Speculative revert to unblock roll: https://codereview.chromium.org/2107223003/
      >
      > Original issue's description:
      > > Amend DataView, ArrayBuffer, and TypedArray methods to use ToIndex.
      > >
      > > The spec was modified to relax some requirements which implementors had not been
      > > enforcing. Part of this process involved introducing a new abstract operation
      > > ToIndex, which had partial overlap with our existing semantics as well as some
      > > differences (most notably treating undefined as 0). Test262 tests were introduced to
      > > check for the new semantics, some of which we were failing. This patch amends the
      > > parts of our implementation corresponding to specification algorithms which use
      > > ToIndex to follow its semantics precisely.
      > >
      > > BUG=v8:4784,v8:5120
      > >
      > > Committed: https://crrev.com/09720349ea058d178521ec58d0a5676443a5a132
      > > Cr-Commit-Position: refs/heads/master@{#37406}
      >
      > TBR=littledan@chromium.org,adamk@chromium.org,bakkot@google.com
      > # Skipping CQ checks because original CL landed less than 1 days ago.
      > NOPRESUBMIT=true
      > NOTREECHECKS=true
      > NOTRY=true
      > BUG=v8:4784,v8:5120
      >
      > Committed: https://crrev.com/b1f7f1f4e41a723d5f997738a07e35a031713b8f
      > Cr-Commit-Position: refs/heads/master@{#37417}
      
      TBR=littledan@chromium.org,adamk@chromium.org,hablich@chromium.org
      # Not skipping CQ checks because original CL landed more than 1 days ago.
      BUG=v8:4784,v8:5120
      
      Review-Url: https://codereview.chromium.org/2247073004
      Cr-Commit-Position: refs/heads/master@{#38689}
      a3c13435
  15. 16 Aug, 2016 1 commit
    • jgruber's avatar
      Refactor data structures for simple stack traces · b4c1aefb
      jgruber authored
      Simple stack traces are captured through Isolate::CaptureSimpleStackTrace.
      Captured frames are stored in a FixedArray, which in turn is stored as a
      property (using a private symbol) on the error object itself. Actual formatting
      of the textual stack trace is done lazily when the user reads the stack
      property of the error object.
      
      This would involve many conversions back and forth between index-encoded raw
      data (receiver, function, offset and code), JS CallSite objects, and C++
      CallSite objects.
      
      This commit refactors the C++ CallSite class into a Struct class called
      StackTraceFrame, which is the new single point of truth frame information.
      Isolate::CaptureSimpleStackTrace stores an array of StackTraceFrames, and JS
      CallSite objects (now created only when the user specifies custom stack trace
      formatting through Error.prepareStackTrace) internally only store a reference
      to a StackTraceFrame.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2230953002
      Cr-Commit-Position: refs/heads/master@{#38645}
      b4c1aefb
  16. 04 Aug, 2016 1 commit
  17. 03 Aug, 2016 2 commits
  18. 02 Aug, 2016 1 commit
  19. 01 Aug, 2016 1 commit
  20. 25 Jul, 2016 2 commits
  21. 22 Jul, 2016 2 commits
  22. 21 Jul, 2016 3 commits
  23. 14 Jul, 2016 1 commit
  24. 01 Jul, 2016 1 commit
    • littledan's avatar
      Implement immutable prototype chains · 0ff7b483
      littledan authored
      This patch implements "immutable prototype exotic objects" from the ECMAScript
      spec, which are objects whose __proto__ cannot be changed, but are not otherwise
      frozen. They are introduced in order to prevent a Proxy from being introduced
      to the prototype chain of the global object.
      
      The API is extended by a SetImmutablePrototype() call in ObjectTemplate, which
      can be used to vend new immutable prototype objects. Additionally, Object.prototype
      is an immutable prototype object.
      
      In the implementation, a new bit is added to Maps to say whether the prototype is
      immutable, which is read by SetPrototype. Map transitions to the immutable prototype
      state are not saved in the transition tree because the main use case is just for
      the prototype chain of the global object, which there will be only one of per
      Context, so no need to take up the extra word for a pointer in each full transition
      tree.
      
      BUG=v8:5149
      
      Review-Url: https://codereview.chromium.org/2108203002
      Cr-Commit-Position: refs/heads/master@{#37482}
      0ff7b483
  25. 30 Jun, 2016 1 commit
    • hablich's avatar
      Revert of Amend DataView, ArrayBuffer, and TypedArray methods to use ToIndex.... · b1f7f1f4
      hablich authored
      Revert of Amend DataView, ArrayBuffer, and TypedArray methods to use ToIndex. (patchset #8 id:140001 of https://codereview.chromium.org/2090353003/ )
      
      Reason for revert:
      Speculative revert to unblock roll: https://codereview.chromium.org/2107223003/
      
      Original issue's description:
      > Amend DataView, ArrayBuffer, and TypedArray methods to use ToIndex.
      >
      > The spec was modified to relax some requirements which implementors had not been
      > enforcing. Part of this process involved introducing a new abstract operation
      > ToIndex, which had partial overlap with our existing semantics as well as some
      > differences (most notably treating undefined as 0). Test262 tests were introduced to
      > check for the new semantics, some of which we were failing. This patch amends the
      > parts of our implementation corresponding to specification algorithms which use
      > ToIndex to follow its semantics precisely.
      >
      > BUG=v8:4784,v8:5120
      >
      > Committed: https://crrev.com/09720349ea058d178521ec58d0a5676443a5a132
      > Cr-Commit-Position: refs/heads/master@{#37406}
      
      TBR=littledan@chromium.org,adamk@chromium.org,bakkot@google.com
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:4784,v8:5120
      
      Review-Url: https://codereview.chromium.org/2113593002
      Cr-Commit-Position: refs/heads/master@{#37417}
      b1f7f1f4
  26. 29 Jun, 2016 1 commit
    • bakkot's avatar
      Amend DataView, ArrayBuffer, and TypedArray methods to use ToIndex. · 09720349
      bakkot authored
      The spec was modified to relax some requirements which implementors had not been
      enforcing. Part of this process involved introducing a new abstract operation
      ToIndex, which had partial overlap with our existing semantics as well as some
      differences (most notably treating undefined as 0). Test262 tests were introduced to
      check for the new semantics, some of which we were failing. This patch amends the
      parts of our implementation corresponding to specification algorithms which use
      ToIndex to follow its semantics precisely.
      
      BUG=v8:4784,v8:5120
      
      Review-Url: https://codereview.chromium.org/2090353003
      Cr-Commit-Position: refs/heads/master@{#37406}
      09720349
  27. 28 Jun, 2016 1 commit
  28. 10 Jun, 2016 1 commit
    • nikolaos's avatar
      Reduce the memory footprint of expression classifiers · dfb8d333
      nikolaos authored
      This patch attempts to reduce the (stack) memory footprint of
      expression classifiers.  Instead of keeping space in each
      classifier for all possible error messages that will
      (potentially) be reported, if an expression turns out to be
      a pattern or a non-pattern, such error messages are placed in
      a list shared by the FunctionState and each classifier keeps a
      couple of indices in this list.  This requires that classifiers
      are used strictly in a stack-based fashion, which is also in line
      with my previous patch for revisiting non-pattern rewriting.
      
      R=adamk@chromium.org
      BUG=chromium:528697
      
      Review-Url: https://codereview.chromium.org/1708193003
      Cr-Commit-Position: refs/heads/master@{#36897}
      dfb8d333
  29. 31 May, 2016 1 commit
    • littledan's avatar
      [esnext] Fix various callsites to use is_resumable, not is_generator · 46253e74
      littledan authored
      Async functions are built out of generators, but the
      SharedFunctionInfo returns false for is_generator. is_resumable is
      the broader query. This patch fixes many parts of V8 to refer
      to is_resumable as appropriate.
      
      One incidental change is to remove a check for generators extending
      classes. This is part of a general check for constructors being the
      only thing which can extend classes, so it is removed here and the
      error message for the general case is made more accurate.
      
      BUG=v8:4483
      
      Review-Url: https://codereview.chromium.org/1996943002
      Cr-Commit-Position: refs/heads/master@{#36621}
      46253e74
  30. 30 May, 2016 1 commit