1. 19 Apr, 2016 1 commit
  2. 04 Apr, 2016 1 commit
  3. 01 Apr, 2016 1 commit
    • littledan's avatar
      Revert of Remove RegExp.prototype.source getter compat workaround (patchset #2... · 31e806eb
      littledan authored
      Revert of Remove RegExp.prototype.source getter compat workaround (patchset #2 id:20001 of https://codereview.chromium.org/1837843002/ )
      
      Reason for revert:
      TC39 decided that this compatibility fix should be standardized.
      
      Original issue's description:
      > Remove RegExp.prototype.source getter compat workaround
      >
      > The getter RegExp.prototype.source is specified in ES2015 to throw when
      > called on a non-RegExp instance, such as RegExp.prototype. We had previously
      > put in a compatibility workaround for all RegExp getters to make them
      > throw on access specifically with RegExp.prototype as the receiver; however,
      > we only have evidence that this is needed for properties other than source.
      > This patch removes the compatibility workaround for get RegExp.prototype.source
      > and gives it semantics precisely as per the ES2015 specification.
      >
      > R=adamk
      > BUG=chromium:581577,v8:4827
      > LOG=Y
      >
      > Committed: https://crrev.com/80803aa89e31839b8f73959776fa7e1923c6b461
      > Cr-Commit-Position: refs/heads/master@{#35086}
      
      R=adamk@chromium.org
      # Not skipping CQ checks because original CL landed more than 1 days ago.
      BUG=chromium:581577,v8:4827
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1847783003
      
      Cr-Commit-Position: refs/heads/master@{#35180}
      31e806eb
  4. 29 Mar, 2016 3 commits
  5. 28 Mar, 2016 1 commit
    • littledan's avatar
      Remove RegExp.prototype.source getter compat workaround · 80803aa8
      littledan authored
      The getter RegExp.prototype.source is specified in ES2015 to throw when
      called on a non-RegExp instance, such as RegExp.prototype. We had previously
      put in a compatibility workaround for all RegExp getters to make them
      throw on access specifically with RegExp.prototype as the receiver; however,
      we only have evidence that this is needed for properties other than source.
      This patch removes the compatibility workaround for get RegExp.prototype.source
      and gives it semantics precisely as per the ES2015 specification.
      
      R=adamk
      BUG=chromium:581577,v8:4827
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1837843002
      
      Cr-Commit-Position: refs/heads/master@{#35086}
      80803aa8
  6. 22 Mar, 2016 2 commits
  7. 16 Mar, 2016 1 commit
  8. 15 Mar, 2016 1 commit
    • littledan's avatar
      Put RegExp js code in strict mode · 80b1b2a4
      littledan authored
      src/js/regexp.js was one of the few files that was left in sloppy
      mode. The ES2017 draft specification requires that writes to
      lastIndex throw when the property is non-writable, and test262
      tests enforce this behavior. This patch puts that file in strict
      mode.
      
      BUG=v8:4504
      R=yangguo@chromium.org
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1776883005
      
      Cr-Commit-Position: refs/heads/master@{#34801}
      80b1b2a4
  9. 11 Mar, 2016 1 commit
  10. 10 Mar, 2016 8 commits
  11. 09 Mar, 2016 1 commit
  12. 07 Mar, 2016 1 commit
    • littledan's avatar
      Base the right RegExp brand checks on Symbol.match · e99d2929
      littledan authored
      The ES2015 specification requires that String.prototype.startsWith,
      String.prototype.endsWith and String.prototype.includes use the IsRegExp
      internal algorithm to determine whether to throw a TypeError to prevent
      a RegExp from being accidentally cast to a String for those methods.
      That internal algorithm checks the presence/truthiness of Symbol.match
      to make its determination. This patch switches the builtins to use
      this correct test, rather than checking for the [[RegExpMatcher]]
      internal slot as the builtins previously did.
      
      R=yangguo
      
      Review URL: https://codereview.chromium.org/1762183002
      
      Cr-Commit-Position: refs/heads/master@{#34547}
      e99d2929
  13. 02 Mar, 2016 1 commit
    • littledan's avatar
      Implement TypedArray(typedarray) constructor · 2fa1c884
      littledan authored
      The ES2016 draft spec defines a sort of fast path for constructing
      a TypedArray based on another TypedArray. This patch implements that
      alternative path in TypedArray construction. It is verified by
      test262 tests, which now pass. This patch also has a slight cleanup
      of TypedArray code by using a macro for TypedArray type checks, as
      is done for other types.
      
      This patch includes a minor spec violation: In the same-type case, the
      spec indicates that the underlying ArrayBuffer should be copied until
      the end, and this is fixed up by making the [[ArrayLength]] shorter.
      This is observable with the buffer getter. This patch just copies the
      used part of the underlying ArrayBuffer.
      
      R=adamk
      BUG=v8:4726
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1754593003
      
      Cr-Commit-Position: refs/heads/master@{#34443}
      2fa1c884
  14. 01 Mar, 2016 4 commits
  15. 26 Feb, 2016 4 commits
  16. 24 Feb, 2016 3 commits
    • littledan's avatar
      Ensure IteratorClose is called for errors in non-declaring assignments · 1aee7555
      littledan authored
      There was a bug in for-of loops without newly declared variables: If,
      in performing the assignment, an exception were thrown, then
      IteratorClose would not be called. The problem was that the assignment
      is done as part of assign_each, which happens before the loop is put
      back in the state which is recognized to be breaking/throwing/returning
      early.
      
      This patch modifies the for-of desugaring by setting the loop state
      before, rather than after, evaluating the assign_each portion, which is
      responsible for evaluating the assignment in for-of loops which do not
      have a declaration.
      
      This patch, together with https://codereview.chromium.org/1728973002 ,
      allow all test262 iterator return-related tests to pass.
      
      R=rossberg
      BUG=v8:4776
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1731773003
      
      Cr-Commit-Position: refs/heads/master@{#34262}
      1aee7555
    • littledan's avatar
      Fix priority of exceptions being thrown from for-of loops · 5f67e34a
      littledan authored
      In the for-of desugaring, IteratorClose is a subtle thing to get right.
      When return exists, the logic for which exception to throw is as follows:
      1. Get the 'return' property and property any exception that might come from
        the property read
      2. Call return, not yet propagating an exception if it's thrown.
      3. If we are closing the iterator due to an exception, propagate that error.
      4. If return threw, propagate that error.
      5. Check if return's return value was not an object, and throw if so
      
      Previously, we were effectively doing step 5 even if an exception "had already
      been thrown" by step 3. Because this took place in a finally block, the exception
      "won the race" and was the one propagated to the user. The fix is a simple change
      to the desugaring to do step 5 only if step 3 didn't happen.
      
      R=rossberg
      BUG=v8:4775
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1728973002
      
      Cr-Commit-Position: refs/heads/master@{#34261}
      5f67e34a
    • littledan's avatar
      Stage ES2015 iterator finalization · cc6d9384
      littledan authored
      This patch moves for-of closing to staging. There are a couple of
      minor semantics bugs remaining in finalization along edge cases, but
      we don't know of any stability issues.
      
      BUG=v8:3566
      R=rossberg
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1725203002
      
      Cr-Commit-Position: refs/heads/master@{#34254}
      cc6d9384
  17. 23 Feb, 2016 2 commits
    • littledan's avatar
      Ensure Array.prototype.indexOf returns +0 rather than -0 · 8798ef2d
      littledan authored
      A recent ES2016 draft spec clarification indicates that, if -0 is
      passed into Array.prototype.indexOf or Array.prototype.lastIndexOf
      as the starting index, and the result is found at index 0, then +0
      rather than -0 should be returned. This patch ensures that V8 has
      that result, which is consistent with what some other browsers
      return. The patch allows a couple test262 tests to pass.
      
      R=adamk
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1729653002
      
      Cr-Commit-Position: refs/heads/master@{#34229}
      8798ef2d
    • littledan's avatar
      ES2015 web compat workaround: RegExp.prototype.flags => "" · b22b2588
      littledan authored
      It turns out that some old polyfill library uses
      RegExp.prototype.flags as a way of feature testing. It's not clear
      how widespread this is. For now, as a minimal workaround, we can
      return undefined from getters like RegExp.prototype.global when
      the receiver is RegExp.prototype. This patch implements that strategy
      but omits a UseCounter to make backports easier.
      
      R=adamk
      CC=yangguo@chromium.org
      BUG=chromium:581577
      LOG=Y
      CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
      
      Review URL: https://codereview.chromium.org/1640803003
      
      Cr-Commit-Position: refs/heads/master@{#34201}
      b22b2588
  18. 22 Feb, 2016 1 commit
    • littledan's avatar
      Remove Reflect.enumerate · 0b53b7d3
      littledan authored
      The Proxy enumerate trap and Reflect.enumerate are removed from the
      ES2016 draft specification. This patch removes the Reflect.enumerate
      function, and a follow-on patch will be responsible for the Proxy
      trap changes.
      
      R=adamk
      LOG=Y
      BUG=v8:4768
      
      Review URL: https://codereview.chromium.org/1721453002
      
      Cr-Commit-Position: refs/heads/master@{#34196}
      0b53b7d3
  19. 19 Feb, 2016 2 commits
  20. 15 Feb, 2016 1 commit