- 10 Sep, 2018 1 commit
-
-
Benedikt Meurer authored
Bug: v8:6344, v8:8015 Change-Id: I6d96f039b47980f9df8d06c4097b70012fce3c82 Reviewed-on: https://chromium-review.googlesource.com/1215163Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#55741}
-
- 02 Sep, 2018 1 commit
-
-
Benedikt Meurer authored
The typing rules for NumberMax and NumberMin didn't properly deal with -0 up until now, leading to suboptimal typing, i.e. for a simple case like Math.max(Math.round(x), 1) TurboFan was unable to figure out that the result is definitely going to be a positive integer in the range [1,inf] or NaN (assuming that NumberOrOddball feedback is used for the value x). Bug: v8:8015 Change-Id: I06e14a9c9b0b813eb214ace7749fcc6ab36bb66a Reviewed-on: https://chromium-review.googlesource.com/1199304 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#55570}
-
- 29 Aug, 2018 1 commit
-
-
Maya Lekova authored
The new node is introduced for literal string addition and calling String.prototype.concat in the typed lowering phase. It later might get optimized away during redundancy elimination, keeping the performance of already existing benchmarks with string addition. In case the operation is about to throw (due to too long string being constructed) we just deoptimize, reusing the interpreter logic for creating the error. Modify relevant mjsunit and unit tests for string concatenation. Bug: v8:7902 Change-Id: Ie97d39534df4480fa8d4fe3ba276d02ed5e750e3 Reviewed-on: https://chromium-review.googlesource.com/1193342 Commit-Queue: Maya Lekova <mslekova@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#55482}
-
- 28 Aug, 2018 1 commit
-
-
Georg Neis authored
Change-Id: Ib967337b140594e70307348e6989b1324a62d71e Reviewed-on: https://chromium-review.googlesource.com/1186641Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#55443}
-
- 16 Aug, 2018 2 commits
-
-
Hai Dang authored
Direct call to CloneFastJSArray is used to improve performance in that case. Tests are also added. Bug: v8:7980 Change-Id: Ifca34f3e182b776cd9862da8bf529fc13f6be9ed Reviewed-on: https://chromium-review.googlesource.com/1172782Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Commit-Queue: Hai Dang <dhai@google.com> Cr-Commit-Position: refs/heads/master@{#55154}
-
Hai Dang authored
This fixes the bug where the reducer ignores a prototype that is not initial. Tests are also added. Bug: v8:8056 Change-Id: I428eed2d2790fffa22f67a051f7d1f1e4d3ce947 Reviewed-on: https://chromium-review.googlesource.com/1174542Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Commit-Queue: Hai Dang <dhai@google.com> Cr-Commit-Position: refs/heads/master@{#55149}
-
- 14 Aug, 2018 1 commit
-
-
Hai Dang authored
This affects map, filter, every, some, indexOf and includes. Tests for those cases and more are also added. Bug: v8:8049 Change-Id: I196abd8e7e2419a2bb465f44caf4de52990ffced Reviewed-on: https://chromium-review.googlesource.com/1172346Reviewed-by:
Georg Neis <neis@chromium.org> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Commit-Queue: Hai Dang <dhai@google.com> Cr-Commit-Position: refs/heads/master@{#55103}
-
- 13 Aug, 2018 1 commit
-
-
Benedikt Meurer authored
The DataView access methods can use the neutering protector to avoid introducing an explicit check into the optimized code to see if the backing store was neutered. Instead the optimized code has an implicit dependency on the global neutering protector which gets invalidated when the first array buffer is neutered (globally). We use the same trick for typed arrays already. Bug: chromium:225811 Change-Id: I9b3c95b3113b8fa00dcbba216ef29c84c0056951 Reviewed-on: https://chromium-review.googlesource.com/1172779 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#55097}
-
- 25 Jul, 2018 1 commit
-
-
Sigurd Schneider authored
Change-Id: If0fb6e4a20c334610453e9fe648151abca681442 Reviewed-on: https://chromium-review.googlesource.com/1150154Reviewed-by:
Georg Neis <neis@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#54696}
-
- 24 Jul, 2018 1 commit
-
-
Théotime Grohens authored
This CL simplifies the implementation of inlined DataView methods in TurboFan. It removes the explicit exception handling, and just deopts and relies on the baseline code to handle exceptions instead. It also adapts the DataView test files in mjsunit/compiler/ accordingly. Change-Id: I013c76970e1480df2b755d17d397bd0f9f26f0ec Reviewed-on: https://chromium-review.googlesource.com/1148207 Commit-Queue: Théotime Grohens <theotime@google.com> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#54648}
-
- 23 Jul, 2018 1 commit
-
-
Sigurd Schneider authored
This is a reland of 9eca23e9 Adds a deopt continuation, which fixes JavaScript stack traces to contain the number constructor after inlining. Original change's description: > [turbofan] Inline Number constructor in certain cases > > This CL adds inlining for the Number constructor if new.target is not > present. The lowering is BigInt compatible, i.e. it converts BigInts to > numbers. > > Bug: v8:7904 > Change-Id: If03b9f872d82e50b6ded7709069181c33dc44e82 > Reviewed-on: https://chromium-review.googlesource.com/1118557 > Commit-Queue: Sigurd Schneider <sigurds@chromium.org> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> > Reviewed-by: Georg Neis <neis@chromium.org> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> > Cr-Commit-Position: refs/heads/master@{#54454} Bug: v8:7904 Change-Id: Ic416e5ba81fa3a0f59ae4afa80df83c46a759487 Reviewed-on: https://chromium-review.googlesource.com/1146581 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#54609}
-
- 09 Jul, 2018 1 commit
-
-
Théotime Grohens authored
This CL completes the implementation of DataView prototype methods in TurboFan, by implementing the Uint8, Int8, Uint16, Int16, Uint32, Int32, Float32 and Float64 setters. DataView performance is now ahead of the equivalent TypedArray wrapper, and is now expected to at least match TypedArray performance in the general case as well. This CL also adds a test file in the compiler directory, to make sure that the setters actually behave correctly. Change-Id: I4ad4341c6b9b9d461348b62216f37a73abe321e8 Reviewed-on: https://chromium-review.googlesource.com/1128867Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Théotime Grohens <theotime@google.com> Cr-Commit-Position: refs/heads/master@{#54331}
-
- 06 Jul, 2018 1 commit
-
-
Théotime Grohens authored
This CL implements Reduction and Lowering for the DataView Int32, Uint32, Float32 and Float64 getters. This makes DataView getters fully supported in TurboFan (except for BigInts), and should bridge the performance gap with TypedArrays. Change-Id: Ifa98df9cf13e44d6468ad9ec8a19c86b41c6d2b1 Reviewed-on: https://chromium-review.googlesource.com/1127360 Commit-Queue: Théotime Grohens <theotime@google.com> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#54288}
-
- 05 Jul, 2018 1 commit
-
-
Théotime Grohens authored
This CL adds a Reduction for the DataViewGetInt16 and -Uint16 builtins, and the corresponding handling in LoadDataViewElement node in the effect control linearizer. It also adds tests for the new getters. Change-Id: I5101755e47657c25f10be1417f105e3ae72a3c39 Reviewed-on: https://chromium-review.googlesource.com/1126919 Commit-Queue: Théotime Grohens <theotime@google.com> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#54271}
-
- 03 Jul, 2018 1 commit
-
-
Théotime Grohens authored
This CL adds code to inline the Int8 and Uint8 getters for DataView objects in TurboFan in js-call-reducer.cc, as well as a new test file. It already improves execution speed compared to the Torque baseline implementation, and implements most of the architecture needed for inlining the other DataView getters and setters as well. Change-Id: I0e62b98fd6ec995f7db5ec42ea1eff1f03572f97 Reviewed-on: https://chromium-review.googlesource.com/1119909Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Reviewed-by:
Michael Stanton <mvstanton@chromium.org> Commit-Queue: Théotime Grohens <theotime@google.com> Cr-Commit-Position: refs/heads/master@{#54157}
-
- 26 Jun, 2018 1 commit
-
-
Georg Neis authored
R=bmeurer@chromium.org Change-Id: Idd9c45f733e2e5d518c69a6ead2b56f6433ca30e Reviewed-on: https://chromium-review.googlesource.com/1114598Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#54020}
-
- 21 Jun, 2018 1 commit
-
-
Georg Neis authored
Also add a DCHECK to a branch that can only be taken for the null prototype. R=sigurds@chromium.org Change-Id: Ib94fe8f25ecfd1a4baa576915e6edfa60bcd771b Reviewed-on: https://chromium-review.googlesource.com/1109961 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#53939}
-
- 24 May, 2018 2 commits
-
-
Sigurd Schneider authored
Bug: v8:7783 Change-Id: I49a6d1a4b22dcfdda206b1c00cfff16310a0458c Reviewed-on: https://chromium-review.googlesource.com/1071609 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Reviewed-by:
Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#53336}
-
Sigurd Schneider authored
Bug: v8:7783 Change-Id: I69e3744a40eeebb5fb4592a4ae56efbb7cb762a8 Reviewed-on: https://chromium-review.googlesource.com/1069354 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Michael Achenbach <machenbach@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#53335}
-
- 18 May, 2018 1 commit
-
-
Sathya Gunasekaran authored
This is not web compatible, so let's delete the code. Bug: v8:5536 Change-Id: I50506d37dcdff1f7f95577c47adcec653cc1f06e Reviewed-on: https://chromium-review.googlesource.com/1064740 Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#53264}
-
- 09 May, 2018 2 commits
-
-
Igor Sheludko authored
... in order to be able to use it in other constants definitions in the header. Bug: v8:7570 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: Id5d6ae34ab401ecf063bf5897b87b6bb87c24960 Reviewed-on: https://chromium-review.googlesource.com/1032782Reviewed-by:
Yang Guo <yangguo@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#53097}
-
Jaroslav Sevcik authored
Bug: chromium:841117 Change-Id: I1e83dfc82f87d0b49d3cca96290ae1d738e37d20 Reviewed-on: https://chromium-review.googlesource.com/1051228Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#53083}
-
- 10 Apr, 2018 1 commit
-
-
Sigurd Schneider authored
This mjsunittest assumed specific internal types (i.e. Smi) for certain fields; it generates some dozens of variants of the test using new Function, but used the same property names in all of them. This causes V8 to sometimes learn more general types for fields (i.e. unboxed double), which the test did not expect. This commit uses unique field names for each of the test variants. Change-Id: Ib1ecb3ae33a57c8a1293a29a2233dad4e16a39fb Reviewed-on: https://chromium-review.googlesource.com/1004897 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#52528}
-
- 04 Apr, 2018 1 commit
-
-
Sigurd Schneider authored
This CL allows builtin continuations to handle pending exceptions. This implements exception handling for the promise constructor in case of deoptimization. Bug: v8:7584 Change-Id: Ib5df5eb6606abb3f9690f294397981858dbdbf25 Reviewed-on: https://chromium-review.googlesource.com/983912 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#52340}
-
- 22 Mar, 2018 1 commit
-
-
Sigurd Schneider authored
Bug: v8:7531, chromium:822170 Change-Id: Ida5b0714a584df3d830f95088db51c1841b63cc2 Reviewed-on: https://chromium-review.googlesource.com/966062Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#52153}
-
- 19 Mar, 2018 1 commit
-
-
Sigurd Schneider authored
This adds variants of tests already in our test-suite that exercise inlining fast-paths of Number.{isFinite,isInteger}. Bug: chromium:823151, chromium:823100 Change-Id: Ibf1192b1325fb4f015acea94053fd51a7a7811a9 Reviewed-on: https://chromium-review.googlesource.com/968361Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#52021}
-
- 16 Mar, 2018 3 commits
-
-
Sigurd Schneider authored
This also adds ObjectIsInteger and NumberIsInteger operators. Bug: v8:7340, v8:7250 Change-Id: I8067276d12c8532931f90e6397f8435362c2f9af Reviewed-on: https://chromium-review.googlesource.com/951602Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#51991}
-
Sigurd Schneider authored
Bug: v8:7516 Change-Id: I0a43197527e3fd4f14862fb782029e9325ae2a00 Reviewed-on: https://chromium-review.googlesource.com/966103 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#51982}
-
Sigurd Schneider authored
This also introduces two new simplified operators, NumberIsFinite and ObjectIsFiniteNumber; the latter handles all values, and the former is a fast-path of the fast-path that is inserted by typed optimization if we know the input has Type::Number. Bug: v8:7340, v8:7250 Change-Id: I1b4812c01bf470bbff40fb3da6e11da543a22cd2 Reviewed-on: https://chromium-review.googlesource.com/951244 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#51980}
-
- 15 Mar, 2018 1 commit
-
-
Benedikt Meurer authored
This introduces a new JSCreateTypedArray operator, backed by a dedicated CreateTypedArray builtin, and adds support to lowering new TypedArray calls to this operator. This way we avoid the overhead of going through the generic construct stub machinery for hot code. This not only recovers the performance regression on the typed array constructor benchmarks, but even improves slightly beyond what we had in 6.6. We might in the future try to fully inline the TypedArray constructor into optimized code for certain cases. Bug: chromium:820726, v8:7503, v8:7518 Change-Id: Ied465924d5695db576d533792f1db68456b9b5ea Reviewed-on: https://chromium-review.googlesource.com/959010 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#51973}
-
- 10 Mar, 2018 1 commit
-
-
Tobias Tebbi authored
The analysis phase used to skip TypeGuard nodes, which are normally re-introduced by the reduction phase. However, phi nodes are created during the analysis phase already, and so it could happen that a phi input skips a TypeGuard. This CL solves the problem by not removing TypeGuard nodes in the first place, but only forwarding the VirtualObject. This is analogous to how we already treat FinishRegion nodes, which are similar in that they are a renaming too. Bug: chromium:741225 Change-Id: Icf8aa2d40a30d89788d875b37b9986111f9c966f Reviewed-on: https://chromium-review.googlesource.com/958442 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#51863}
-
- 02 Mar, 2018 1 commit
-
-
Tobias Tebbi authored
Folding _ + NaN => NaN can widen type None to a constant type, which leads to floating DeadValue nodes. This CL fixes this by removing the optimization. Alternatively, we should consider removing all nodes of type None in simplified lowering. Bug: chromium:817225 Change-Id: I2a126b360d70d3626f8a3c5e73ac72dc980ac8b3 Reviewed-on: https://chromium-review.googlesource.com/946129Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#51699}
-
- 27 Feb, 2018 1 commit
-
-
Jaroslav Sevcik authored
Turbofan can only handle 64K control inputs for merges. Such large can only be created by functions with 64K jumps, so we limit the bytecode size to the minimum size of bytecode arrays with 64K jumps. Bug: chromium:815392, v8:7438 Change-Id: I674705e87e19ce451b40d5827c9fe3e6ec17293a Reviewed-on: https://chromium-review.googlesource.com/938421 Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#51598}
-
- 23 Feb, 2018 1 commit
-
-
Peter Marshall authored
This fixes issues where the stack track contained 'Promise' but not 'new'. Bug: v8:7253 Change-Id: I840fcc0a76e2376aab0b64d321f5cf8ccc672956 Reviewed-on: https://chromium-review.googlesource.com/928762 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#51516}
-
- 21 Feb, 2018 1 commit
-
-
Peter Marshall authored
This adds a frame state for the call to the executor in inlined promise constructors. We provide a continuation function in case of deopts which just returns the created promise. This is not totally correct yet: if the executor function also throws, we need to catch it and call the reject function instead. We also still need to add a frame state for the isCallable check on the executor, so that the stack is correct for the thrown TypeError. Bug: v8:7253 Change-Id: I3ee042ec82f1a9a35d59e576f6c8efe9bc98698c Reviewed-on: https://chromium-review.googlesource.com/926523Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#51417}
-
- 20 Feb, 2018 4 commits
-
-
Tobias Tebbi authored
Without processing the input, a phi node can be flagged as unused and replaced with {Dead}, although it is used by a {DeadValue} node. Bug: chromium:808472 Change-Id: I7446883535b34770e31e4e26e1c242eb05673a91 Reviewed-on: https://chromium-review.googlesource.com/919362 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#51395}
-
Benedikt Meurer authored
This makes the inlining of the default resolve/reject closures generated by the Promise constructor effective. To be really useful we still need to have the Promise constructor inlined (work-in-progress) and eventually track SharedFunctionInfo feedback in the CALL_IC. Bug: v8:2206, v8:7253 Change-Id: I08fa8ca72754f459ae36027a55377ef57d411cdc Reviewed-on: https://chromium-review.googlesource.com/926103 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Michael Stanton <mvstanton@chromium.org> Cr-Commit-Position: refs/heads/master@{#51390}
-
Peter Marshall authored
Inline the promise constructor when we have one argument and target matches new_target. This is not complete, and is sitting behind an experimental flag for now. We need to fix deoptimization by providing proper frame states. Create a unittest class for JSCallReducer - just assert whether there was a change or not, rather than specify the exact graph that should be produced. Bug: v8:7253 Change-Id: Ib6886a8feb2799f47cd647853cabcf12a189bc25 Reviewed-on: https://chromium-review.googlesource.com/919282 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#51389}
-
Benedikt Meurer authored
This CL introduces new operators JSFulfillPromise and JSPromiseResolve, corresponding to the specification operations with the same name, and uses that to lower calls to Promise.resolve() builtin to JSPromiseResolve. We also optimize JSPromiseResolve and JSResolvePromise further based on information found about the value/resolution in the graph. This applies to both Promise.resolve() builtin calls and implicit resolve operations in async functions and async generators. On a very simple microbenchmark like console.time('resolve'); for (let i = 0; i < 1e8; ++i) Promise.resolve({i}); console.timeEnd('resolve'); this CL reduces the execution time from around 3049ms to around 947ms, which is a pretty significant 3x improvement. On the wikipedia benchmark we observe an improvement around 2% with this CL. Bug: v8:7253 Change-Id: Ic69086cdc1b724f35dbe83305795539c562ab817 Reviewed-on: https://chromium-review.googlesource.com/913488Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#51387}
-
- 13 Feb, 2018 1 commit
-
-
Benedikt Meurer authored
This introduces dedicated builtins - FulfillPromise, - RejectPromise, and - ResolvePromise, which perform the corresponding operations from the language specification, and removes the redundant entry points and the excessive inlining of these operations into other builtins. We also add the same logic on the C++ side, so that we don't need to go into JavaScript land when resolving/rejecting from the API. The C++ side has a complete implementation, including full support for the debugger and the current PromiseHook machinery. This is to avoid constantly crossing the boundary for those cases, and to also simplify the CSA side (and soon the TurboFan side), where we only do the fast-path and bail out to the runtime for the general handling. On top of this we introduce %_RejectPromise and %_ResolvePromise, which are entry points used by the bytecode and parser desugarings for async functions, and also used by the V8 Extras API. Thanks to this we can uniformly optimize these in TurboFan, where we have corresponding operators JSRejectPromise and JSResolvePromise, which currently just call into the builtins, but middle-term can be further optimized, i.e. to skip the "then" lookup for JSResolvePromise when we know something about the resolution. In TurboFan we can also already inline the default PromiseCapability [[Reject]] and [[Resolve]] functions, although this is not as effective as it can be right now, until we have inlining support for the Promise constructor (being worked on by petermarshall@ right now) and/or SFI based CALL_IC feedback. Overall this change is meant as a refactoring without significant performance impact anywhere; it seems to improve performance of simple async functions a bit, but otherwise is neutral. Bug: v8:7253 Change-Id: Id0b979f9b2843560e38cd8df4b02627dad4b6d8c Reviewed-on: https://chromium-review.googlesource.com/911632Reviewed-by:
Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#51260}
-