1. 19 Aug, 2015 1 commit
    • yangguo's avatar
      Native context: debug.js does not load from js builtins object anymore. · eb8c0928
      yangguo authored
      This mainly changes how we share ToBoolean, ToNumber and ToString between
      native scripts. Instead of putting them on the js builtins object, we now
      explicitly export and import those functions.
      
      I also had to change the import/export mechanism slightly. Previously,
      exports and imports are hooked up after all native scripts have been
      executed. This means that imported functions cannot be called at the time
      the native script is executed.
      
      However, since ToBoolean (and also e.g. ObjectDefineProperties) is called
      in v8natives.js, I changed the mechanism so that exports from previous
      native scripts (runtime.js for ToBoolean) is imported immediately and can
      be called.
      
      R=cbruni@chromium.org
      
      Review URL: https://codereview.chromium.org/1302533002
      
      Cr-Commit-Position: refs/heads/master@{#30244}
      eb8c0928
  2. 16 Jul, 2015 1 commit
    • littledan's avatar
      Array.prototype.reverse should call [[HasProperty]] on elements before [[Get]] · f76dfee9
      littledan authored
      This is a change from ES5 to ES6: When reversing an array, first it is checked
      whether the element exists, before the element is looked up. The order in ES6
      is
      
      [[HasElement]] lower
      [[Get]] lower (if present)
      [[HasElement]] upper
      [[Get]] upper (if present)
      
      In ES5, on the other hand, the order was
      
      [[Get]] lower
      [[Get]] upper
      [[HasElement]] lower
      [[HasElement]] upper
      
      To mitigate the performance impact, this patch implements a new, third copy
      of reversing arrays if %_HasPackedElements. This allows us to skip all
      membership tests, and a quick and dirty benchmark shows that the new version
      is faster:
      
      Over 4 runs, the slowest for the new version:
      d8> var start = Date.now(); for (var i = 0; i < 100000000; i++) [1, 2, 3, 4, 5].reverse(); Date.now() - start
      4658
      
      Over 3 runs, the fastest for the old version:
      d8> var start = Date.now(); for (var i = 0; i < 100000000; i++) [1, 2, 3, 4, 5].reverse(); Date.now() - start
      5176
      
      BUG=v8:4223
      R=adamk
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1238593003
      
      Cr-Commit-Position: refs/heads/master@{#29716}
      f76dfee9
  3. 17 Jun, 2015 1 commit
  4. 16 Jun, 2015 1 commit
    • littledan's avatar
      Add %TypedArray% to proto chain · a1059015
      littledan authored
      According to the ES6 spec, the main methods and getters shouldn't
      be properties of the individual TypedArray objects and prototypes
      but instead on %TypedArray% and %TypedArray%.prototype. This
      difference is observable through introspection. This patch moves
      some methods and getters to the proper place, with the exception
      of %TypedArray%.prototype.subarray and harmony methods. These will
      be moved in follow-on patches.
      
      BUG=v8:4085
      LOG=Y
      R=adamk
      
      Review URL: https://codereview.chromium.org/1186733002
      
      Cr-Commit-Position: refs/heads/master@{#29057}
      a1059015
  5. 15 Jun, 2015 1 commit
  6. 09 Jun, 2015 1 commit
    • dehrenberg's avatar
      Implement %TypedArray%.prototype.slice · 51df8df9
      dehrenberg authored
      The initial implementation of this method takes a couple shortcuts:
      - At some points in the spec, we should be making a reference to
        "Table 49" and instead do property lookup on the constructor.
        This is an issue with some other TypedArray methods too.
      - The spec indicates that, if constructor and @@species haven't been
        messed with in particular ways, then there should be a memcpy
        from the old to the new. That fast path is not implemented here
        in this patch, but because V8 doesn't canonicalize NaN, the result
        isn't observably different.
      
      BUG=v8:3578
      LOG=Y
      R=arv
      
      Review URL: https://codereview.chromium.org/1170023002
      
      Cr-Commit-Position: refs/heads/master@{#28882}
      51df8df9
  7. 04 Jun, 2015 1 commit
  8. 03 Jun, 2015 2 commits
  9. 02 Jun, 2015 1 commit
  10. 26 May, 2015 1 commit
  11. 22 May, 2015 4 commits
  12. 21 May, 2015 2 commits
  13. 20 May, 2015 5 commits
  14. 19 May, 2015 2 commits
  15. 18 May, 2015 1 commit
    • dehrenberg's avatar
      Add TypedArray.from method · cc3f59db
      dehrenberg authored
      This function creates a new way to make TypedArrays based on existing
      iterable or Array-like objects, analogous to Array.from. The patch
      implements the function and adds tests.
      
      R=arv@chromium.org
      BUG=v8:3578
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1132163011
      
      Cr-Commit-Position: refs/heads/master@{#28456}
      cc3f59db
  16. 13 May, 2015 1 commit
  17. 12 May, 2015 5 commits
  18. 11 May, 2015 1 commit
  19. 09 May, 2015 1 commit
    • dehrenberg's avatar
      Make one copy for all TypedArray methods · ca9d499f
      dehrenberg authored
      This is the first step of converting TypedArrays to the proper
      proto chain. There is one copy for each of the Harmony TypedArray
      methods, rather than a version for each TypedArray type. This
      form prevents accidentally baking in knowledge about a particular
      array type into the method definition.
      
      R=adamk@chromium.org, arv@chromium.org, caitpotter88@gmail.com, dslomov@chromium.org, jochen@chromium.org
      BUG=v8:4085
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1126313003
      
      Cr-Commit-Position: refs/heads/master@{#28325}
      ca9d499f
  20. 07 May, 2015 2 commits
  21. 06 May, 2015 3 commits
  22. 05 May, 2015 2 commits