- 29 Nov, 2017 2 commits
-
-
peterwmwong authored
This reduces the overhead of calling the builtin. Quick measurements show >5x improvement. As the typed array's size grows, iterating dominates and the performance gap closes. https://github.com/peterwmwong/v8-perf/blob/master/typedarray-findIndex/README.md Bug: v8:5929 Change-Id: I27d67776c83cbe28f4f9f5ef479a7eeabf594654 Reviewed-on: https://chromium-review.googlesource.com/792394 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#49720}
-
peterwmwong authored
This reduces the overhead of calling the builtin. Quick measurements show >5x improvement. As the typed array's size grows, iterating dominates and the performance gap closes. https://github.com/peterwmwong/v8-perf/blob/master/typedarray-find/README.md Bug: v8:5929 Change-Id: Ia74546bb46d446c6161c8956e350d4b5cdc1b328 Reviewed-on: https://chromium-review.googlesource.com/792454 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#49706}
-
- 28 Nov, 2017 1 commit
-
-
Igor Sheludko authored
1) Make sure we don't enable prototype setup mode for parent class and its prototype objects. 2) Make sure we create builtins and their prototypes with completed setup mode. 3) Drive-by-fix: setup typed array classes in bootstrapper.cc instead of typedarray.js, and drop %FunctionSetPrototype(). Bug: v8:7115, v8:5902 Change-Id: I58ac091d85647abc3307bd47baf48e378e3695c5 Reviewed-on: https://chromium-review.googlesource.com/790992 Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#49655}
-
- 17 Oct, 2017 1 commit
-
-
jgruber authored
Remove unused macros, and move macro definitions used only in a single file into the file itself. Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Change-Id: If62107816ad1e6addf58705a075d3eba4f23bf08 Reviewed-on: https://chromium-review.googlesource.com/721381Reviewed-by: Peter Marshall <petermarshall@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#48625}
-
- 02 Oct, 2017 1 commit
-
-
Benedikt Meurer authored
The TypedArray.prototype[Symbol.toStringTag] getter is currently the best (and as far as I can tell only definitely side-effect free) way to check whether an arbitrary object is a TypedArray - either generally TypedArray or a specific one like Uint8Array. Using the getter is thus emerging as the general pattern to detect TypedArrays, even Node.js now adapted it starting with https://github.com/nodejs/node/pull/15663 for the isTypedArray and isUint8Array type checks in lib/internal/util/types.js now. The getter returns either the string with the TypedArray subclass name (i.e. "Uint8Array") or undefined if the receiver is not a TypedArray. This can be implemented with a simple elements kind dispatch, instead of checking the instance type and then loading the class name from the constructor, which requires a loop walking up the transition tree. This CL ports the builtin to CSA and TurboFan, and changes the logic to a simple elements kind check. On the micro-benchmark mentioned in the referenced bug, the time goes from testIsArrayBufferView: 565 ms. testIsTypedArray: 2403 ms. testIsUint8Array: 3847 ms. to testIsArrayBufferView: 566 ms. testIsTypedArray: 965 ms. testIsUint8Array: 965 ms. which presents an up to 4x improvement. Bug: v8:6874 Change-Id: I9c330b4529d9631df2f052acf023c6a4fae69611 Reviewed-on: https://chromium-review.googlesource.com/695021Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#48254}
-
- 15 Sep, 2017 1 commit
-
-
Mathias Bynens authored
This patch ensures a `TypeError` is thrown when the argument passed to `Array.prototype.sort` or `%TypedArray%.prototype.sort` is neither a function nor `undefined`. Every other major JavaScript engine already threw in this case. Making V8’s behavior match increases interoperability. https://github.com/tc39/ecma262/pull/785 BUG=v8:6542 Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Change-Id: I412a59810abdd118217c8d8361389ec6c2f640bd Reviewed-on: https://chromium-review.googlesource.com/668356 Commit-Queue: Mathias Bynens <mathias@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#48028}
-
- 13 Sep, 2017 1 commit
-
-
Adam Klein authored
In the years since https://codereview.chromium.org/1331993004, a lot has changed in v8: Math.max/min are now CSA builtins, with lowerings in TF. In a quick test on my machine of the microbenchmark on that CL (modified with start and end values), I don't detect any difference in speed between the macro versions on master and this version. Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Change-Id: I82d9d14c043fd2a112050cdbcb98a872bfb87b61 Reviewed-on: https://chromium-review.googlesource.com/664339Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#47994}
-
- 06 Sep, 2017 2 commits
-
-
Mythri authored
This is the second attempt at removing this. Earlier (https://chromium-review.googlesource.com/579194) there were regressions on some of the functions related to maps and sets. Now that all of them are ported to CSA, we can remove the remaining uses of SetForceInlineFlag. Bug: v8:6682 Change-Id: Iebf296038aa24b65181b0d10531b0569d313e7fc Reviewed-on: https://chromium-review.googlesource.com/647452Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#47856}
-
Yang Guo authored
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Change-Id: I1a9561adc44ee1d8a6b68c36604992261c490043 Reviewed-on: https://chromium-review.googlesource.com/651414Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#47848}
-
- 01 Sep, 2017 1 commit
-
-
Franziska Hinkelmann authored
Bug: v8:6704 Change-Id: I77388b91061f934943a707a645080dfdcf481836 Reviewed-on: https://chromium-review.googlesource.com/645951Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#47756}
-
- 31 Aug, 2017 1 commit
-
-
Franziska Hinkelmann authored
Bug: v8:6704 Change-Id: If636bdd682d76a6d58d36fc9bfbf1302a32468ab Reviewed-on: https://chromium-review.googlesource.com/641671 Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#47732}
-
- 18 Aug, 2017 2 commits
-
-
Franziska Hinkelmann authored
%TypedArray%.prototype.set should throw a range error for invalid offset. Bug: v8:6729 Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Change-Id: I2b2b64a82657ecabf136ec8f13b41e95a62b8f38 Reviewed-on: https://chromium-review.googlesource.com/620569 Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#47443}
-
Franziska Hinkelmann authored
Bug: v8:6704 Change-Id: I153a8d3501de19f4e5d9c580060f987f169b5edd Reviewed-on: https://chromium-review.googlesource.com/617000Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#47426}
-
- 17 Aug, 2017 1 commit
-
-
Franziska Hinkelmann authored
This is a reland of a50b6751 Original change's description: > [runtime] Port TypedArraySetFormArrayLike to C++ > > Bug: v8:6704 > Change-Id: I316f085801f4fb6a792124f9a6f80a16e6d43162 > Reviewed-on: https://chromium-review.googlesource.com/616721 > Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> > Cr-Commit-Position: refs/heads/master@{#47369} Bug: v8:6704 Change-Id: Id07f141f5f695e871248b4e5dcde0e7aa04e5493 TBR=bmeurer@chromium.org Change-Id: Id07f141f5f695e871248b4e5dcde0e7aa04e5493 Reviewed-on: https://chromium-review.googlesource.com/619214 Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Reviewed-by: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#47411}
-
- 16 Aug, 2017 2 commits
-
-
Franziska Hinkelmann authored
This reverts commit a50b6751. Reason for revert: Regression Original change's description: > [runtime] Port TypedArraySetFormArrayLike to C++ > > Bug: v8:6704 > Change-Id: I316f085801f4fb6a792124f9a6f80a16e6d43162 > Reviewed-on: https://chromium-review.googlesource.com/616721 > Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> > Cr-Commit-Position: refs/heads/master@{#47369} TBR=franzih@chromium.org,bmeurer@chromium.org Change-Id: Ibafeae41c85b6d7848b26dac7468057e1cea4769 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:6704 Reviewed-on: https://chromium-review.googlesource.com/617480Reviewed-by: Franziska Hinkelmann <franzih@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#47383}
-
Franziska Hinkelmann authored
Bug: v8:6704 Change-Id: I316f085801f4fb6a792124f9a6f80a16e6d43162 Reviewed-on: https://chromium-review.googlesource.com/616721 Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#47369}
-
- 14 Aug, 2017 1 commit
-
-
Franziska Hinkelmann authored
Add benchmark for TypedArray.prototype.set when setting from another TypedArray with the same type. Bug: v8:6704 Change-Id: Ibde60b17aa32fb9c8237b2ab766d2b2913e256d7 Reviewed-on: https://chromium-review.googlesource.com/613264Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#47342}
-
- 20 Jul, 2017 1 commit
-
-
Mythri Alle authored
This reverts commit ae9a2d38. Reason for revert: Regresses benchmarks related to maps and sets. Regressions here: https://chromeperf.appspot.com/group_report?rev=46756. In future when we move these builtins to CSA, we may still want to remove this flag. Original change's description: > Remove SetForceInlineFlag from src/js/* > > Remove SetForceInlineFlag from the js builtins. > > Bug: > Change-Id: I962982509c82e4baba8dc32a0f163147c47daf34 > Reviewed-on: https://chromium-review.googlesource.com/571803 > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> > Commit-Queue: Mythri Alle <mythria@chromium.org> > Cr-Commit-Position: refs/heads/master@{#46756} TBR=rmcilroy@chromium.org,jarin@chromium.org,mythria@chromium.org,bmeurer@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I96651aa9d6e91e593af8da1b531e9f7b0240088f Reviewed-on: https://chromium-review.googlesource.com/579194 Commit-Queue: Mythri Alle <mythria@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Cr-Commit-Position: refs/heads/master@{#46797}
-
- 19 Jul, 2017 1 commit
-
-
Mythri authored
Remove SetForceInlineFlag from the js builtins. Bug: Change-Id: I962982509c82e4baba8dc32a0f163147c47daf34 Reviewed-on: https://chromium-review.googlesource.com/571803Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Mythri Alle <mythria@chromium.org> Cr-Commit-Position: refs/heads/master@{#46756}
-
- 28 Jun, 2017 1 commit
-
-
Igor Sheludko authored
This CL replaces usages of utils.InstallFunctions and utils.InstallGetter() with the DEFINE_METHOD* macros that ensure that the native function is created in proper form from the beginning. Thus the function will not require further reconfiguring like adding a computed name or removing of 'prototype' property. This CL is one of a series of cleanup CL which are the preliminary steps for improving function closures creation. Bug: v8:6459 Change-Id: I8432be211adf104cacb74ba2431364bfd6614d18 Reviewed-on: https://chromium-review.googlesource.com/548177 Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#46297}
-
- 22 May, 2017 1 commit
-
-
Tobias Tebbi authored
Bug: Change-Id: I472cc64bfbbef5ce6643b506b1fcb56c1cee5f24 Reviewed-on: https://chromium-review.googlesource.com/509715Reviewed-by: Daniel Clifford <danno@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#45463}
-
- 19 May, 2017 1 commit
-
-
Tobias Tebbi authored
[builtins] Enable %TypedArray%.prototype.{some,every,reduce,reduceRight,map} CSA builtins by default R=danno@chromium.org Change-Id: I3365642b2682c09d745b7bcc9f983179604e7c3a Reviewed-on: https://chromium-review.googlesource.com/509549 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Daniel Clifford <danno@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#45423}
-
- 02 May, 2017 1 commit
-
-
Peter Marshall authored
String inputs would end up in the fast-path, crashing because it expected an array type. Add the fast path explicitly when the source is a TypedArray, and let everything else fall back to the generic JS implementation. Bug: chromium:715971 Change-Id: Ieec28e93279047d403e00ed2676dc1eda193c033 Reviewed-on: https://chromium-review.googlesource.com/493226 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#45034}
-
- 27 Apr, 2017 1 commit
-
-
Peter Marshall authored
Performance regressed for this with the I+TF switch. This speeds up the simple case by using optimizations in the elements accessor. Bug: chromium:700835 Change-Id: Iaba30951b93daefa0fb32acd6656ac705cdc73ed Reviewed-on: https://chromium-review.googlesource.com/483341 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Franziska Hinkelmann <franzih@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#44913}
-
- 26 Apr, 2017 1 commit
-
-
cwhan.tunz authored
- Throw TypeError in ValidateTypedArray, matching JSC, SpiderMonkey and ChakraCore. - Validate typed arrays at start of each typed array prototype methods in src/js/typedarrays.js - Add tests to check detached buffers - Remove an unnecessary parameter of TypedArraySpeciesCreate in src/js/typedarrays.js - Standardize TypedArray.prototype.subarray - Update test262.status to pass detached buffer tests Reland of https://codereview.chromium.org/2778623003 BUG=v8:4648, v8:4665, v8:4953 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2827443002 Cr-Commit-Position: refs/heads/master@{#44878}
-
- 24 Apr, 2017 1 commit
-
-
mvstanton authored
BUG= Review-Url: https://codereview.chromium.org/2775503006 Cr-Commit-Position: refs/heads/master@{#44793}
-
- 19 Apr, 2017 2 commits
-
-
Adam Klein authored
This patch retires runtime.js: - Removes some dead code from runtime.js (ToPositiveInteger, ToIndex), - Moves Array.prototype initialization to prologue.js - Moves SpeciesConstructor to the only file that calls it (typedarray.js) - Renames the remainder to reflect its only inhabitants ({Max,Min}Simple) Change-Id: If9048a30c4f6b86396bfd647bb637b4175880fc3 Reviewed-on: https://chromium-review.googlesource.com/478579Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#44730}
-
Peter Marshall authored
This includes a fastpath in the ElementsAccessor for the source array being a JSArray with FastSmi or FastDouble packed kinds. This is probably a pretty common usage, where an array is passed in as a way of initializing the TypedArray at creation (as there is not other syntax to do this). e.g. new Float64Array([1.0, 1.0, 1.0]) for some sort of vector application. BUG= v8:5977 Change-Id: Ice4ad9fc29f56b1c4b0b30736a1330efdc289003 Reviewed-on: https://chromium-review.googlesource.com/465126Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#44722}
-
- 10 Apr, 2017 1 commit
-
-
Peter Marshall authored
The spec requires that we use IterableToList, which we skipped for some arrays as an optimization. We can't skip this for arrays with objects though, because the objects may mutate the array during the copying step via valueOf side effects. Also clean up the implementation to use a runtime function rather than a builtin as the helper. Also reverses the result of the helper because I think it is a bit more intuitive that way. Bug: v8:6224 Change-Id: I9199491abede4479785df6d9068331bc2d6e9c5e Reviewed-on: https://chromium-review.googlesource.com/471986Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#44507}
-
- 08 Apr, 2017 1 commit
-
-
binji authored
This revealed a bug in the TypedArray(typedArray) constructor when the arg is backed by a SharedArrayBuffer. Also install the species getter and add a test, since it's not tested in test262 presently. BUG=v8:5983,v8:5984 R=adamk@chromium.org Review-Url: https://codereview.chromium.org/2798403004 Cr-Commit-Position: refs/heads/master@{#44500}
-
- 04 Apr, 2017 2 commits
-
-
machenbach authored
Revert of [typedarrays] Check detached buffer at start of typed array methods (patchset #10 id:180001 of https://codereview.chromium.org/2778623003/ ) Reason for revert: Breaks layout tests: https://build.chromium.org/p/tryserver.v8/builders/v8_linux_blink_rel/builds/18499 Changes: https://storage.googleapis.com/chromium-layout-test-archives/v8_linux_blink_rel/18499/layout-test-results/results.html See: https://github.com/v8/v8/wiki/Blink-layout-tests Original issue's description: > [typedarrays] Check detached buffer at start of typed array methods > > - Throw TypeError in ValidateTypedArray, matching JSC, SpiderMonkey > and ChakraCore. > - Validate typed arrays at start of each typed array prototype > methods in src/js/typedarrays.js > - Add tests to check detached buffers > - Remove an unnecessary parameter of TypedArraySpeciesCreate > in src/js/typedarrays.js > - Standardize TypedArray.prototype.subarray > - Update test262.status to pass detached buffer tests > > BUG=v8:4648,v8:4665,v8:4953 > > Review-Url: https://codereview.chromium.org/2778623003 > Cr-Commit-Position: refs/heads/master@{#44357} > Committed: https://chromium.googlesource.com/v8/v8/+/238d5b4453d9166aaddce76a5393514d977238d4 TBR=cbruni@chromium.org,adamk@chromium.org,bmeurer@chromium.org,littledan@chromium.org,petermarshall@chromium.org,cwhan.tunz@gmail.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:4648,v8:4665,v8:4953 Review-Url: https://codereview.chromium.org/2793233003 Cr-Commit-Position: refs/heads/master@{#44362}
-
cwhan.tunz authored
- Throw TypeError in ValidateTypedArray, matching JSC, SpiderMonkey and ChakraCore. - Validate typed arrays at start of each typed array prototype methods in src/js/typedarrays.js - Add tests to check detached buffers - Remove an unnecessary parameter of TypedArraySpeciesCreate in src/js/typedarrays.js - Standardize TypedArray.prototype.subarray - Update test262.status to pass detached buffer tests BUG=v8:4648,v8:4665,v8:4953 Review-Url: https://codereview.chromium.org/2778623003 Cr-Commit-Position: refs/heads/master@{#44357}
-
- 03 Apr, 2017 1 commit
-
-
cwhan.tunz authored
Since byteOffset is configurable, we need to access byteOffset by %_ArrayBufferViewGetByteOffset, instead of accessing .byteOffset property. BUG=v8:6120 Review-Url: https://codereview.chromium.org/2761673003 Cr-Commit-Position: refs/heads/master@{#44347}
-
- 01 Apr, 2017 1 commit
-
-
cwhan.tunz authored
- Implement %TypedArray%.prototype.slice to C++ builtins - Remove TypedArraySlice in src/js/typedarray.js - Implement TypedArraySpeciesCreate in builtins-typedarray.cc - Implement TypedArrayCreate in builtins-typedarray.cc BUG=v8:5929 Review-Url: https://codereview.chromium.org/2763473002 Cr-Commit-Position: refs/heads/master@{#44322}
-
- 31 Mar, 2017 2 commits
-
-
Peter Marshall authored
This CL uses the same logic as spread calls to check whether the iteration over an array would produce different results to simply accessing the backing store directly. Skipping the full iteration protocol for normal arrays gives us a ~10x speedup on the construct-typedarray benchmark. BUG=v8:5977,v8:5699,v8:4782,chromium:698173 Change-Id: Ib878d39691e99b739afef0dd05a6a6efc5b6b5d4 Reviewed-on: https://chromium-review.googlesource.com/463367Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#44304}
-
Peter Marshall authored
The last CL https://chromium-review.googlesource.com/c/456707/ caused some pretty heavy performance regressions. After experimenting, it seems the easiest and most straight-forward way to copy the elements into the new typed array is to do it in JS. Adds a fast path for typed arrays, where the source typed array has the same elements kind, in which case we can just copy the backing store using memcpy. This CL also removes regression test 319120 which is from a pwn2own vulnerability. The old code path enforced a maximum byte_length that was too low, which this change removes. The length property of the typed array must be a Smi, but the byte_length, which can be up to 8x larger than length for a Float64Array, can be a heap number. We can also re-use some of the logic from ConstructByLength when deciding whether to allocate the buffer on- or off-heap, so that is factored out into InitializeBasedOnLength. We can also re-use the DoInitialize helper instead of calling into the runtime, meaning we can remove InitializeFromArrayLike. BUG=v8:5977,chromium:705503,chromium:705394 Change-Id: I63372652091d4bdf3a9491acef9b4e3ac793a755 Reviewed-on: https://chromium-review.googlesource.com/459621Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#44301}
-
- 30 Mar, 2017 1 commit
-
-
Peter Marshall authored
We don't use it anywhere anymore. BUG= Change-Id: I9acd9c427c6af7422bbdf58088b61ceafd1ee655 Reviewed-on: https://chromium-review.googlesource.com/462968Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#44265}
-
- 25 Mar, 2017 1 commit
-
-
cwhan.tunz authored
- Implement %TypedArray%prototype.reverse in builtins and ElementsAccessor to use std::reverse - Remove TypedArrayReverse in src/js/typedarray.js - Fix typo in comments BUG=v8:5929 Review-Url: https://codereview.chromium.org/2761453002 Cr-Commit-Position: refs/heads/master@{#44132}
-
- 24 Mar, 2017 2 commits
-
-
Peter Marshall authored
This helper is used directly when constructing from an object with a length, as well as by ConstructByIterable and ByTypedArray. BUG=v8:5977 Change-Id: I18a4829c2a22a6099cf3b0824ea1f698bfbf1917 Reviewed-on: https://chromium-review.googlesource.com/456707Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Franziska Hinkelmann <franzih@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#44116}
-
danno authored
BUG=v8:1956 Review-Url: https://codereview.chromium.org/2776433003 Cr-Commit-Position: refs/heads/master@{#44105}
-