- 20 Jun, 2018 1 commit
-
-
Maya Lekova authored
This is a reland of 21c0d77e Original change's description: > [async] Optimize await and AsyncFromSyncIterator > > Simplify the promise wrapping in await and > %AsyncFromSyncIteratorPrototype%.next/return/throw to reuse the PromiseResolve > primitive. Now await takes 1 tick instead of 3 on the microtask queue. > > Change-Id: I7e99b8689eb8fcb09c48915b11c1e06684dc0f1a > Reviewed-on: https://chromium-review.googlesource.com/1090272 > Commit-Queue: Maya Lekova <mslekova@chromium.org> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> > Reviewed-by: Mathias Bynens <mathias@chromium.org> > Cr-Commit-Position: refs/heads/master@{#53853} Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: Ifa5b2fb8b2fb84b635b2dc1b6455d6aaf154cbfd Reviewed-on: https://chromium-review.googlesource.com/1106977 Commit-Queue: Maya Lekova <mslekova@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#53900}
-
- 19 Jun, 2018 2 commits
-
-
Bill Budge authored
This reverts commit 21c0d77e. Reason for revert: Compile failure in bootstrapper.cc Original change's description: > [async] Optimize await and AsyncFromSyncIterator > > Simplify the promise wrapping in await and > %AsyncFromSyncIteratorPrototype%.next/return/throw to reuse the PromiseResolve > primitive. Now await takes 1 tick instead of 3 on the microtask queue. > > Change-Id: I7e99b8689eb8fcb09c48915b11c1e06684dc0f1a > Reviewed-on: https://chromium-review.googlesource.com/1090272 > Commit-Queue: Maya Lekova <mslekova@chromium.org> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> > Reviewed-by: Mathias Bynens <mathias@chromium.org> > Cr-Commit-Position: refs/heads/master@{#53853} TBR=kozyatinskiy@chromium.org,littledan@chromium.org,gsathya@chromium.org,bmeurer@chromium.org,domenic@chromium.org,mathias@chromium.org,mslekova@chromium.org Change-Id: Ia631acdfcd5c1f9c28c1540c8da16cdf076abf87 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/1106566Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Bill Budge <bbudge@chromium.org> Cr-Commit-Position: refs/heads/master@{#53855}
-
Maya Lekova authored
Simplify the promise wrapping in await and %AsyncFromSyncIteratorPrototype%.next/return/throw to reuse the PromiseResolve primitive. Now await takes 1 tick instead of 3 on the microtask queue. Change-Id: I7e99b8689eb8fcb09c48915b11c1e06684dc0f1a Reviewed-on: https://chromium-review.googlesource.com/1090272 Commit-Queue: Maya Lekova <mslekova@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/master@{#53853}
-
- 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}
-
- 08 Feb, 2018 1 commit
-
-
Adam Klein authored
This reverts commit 14108f4c. Reason for revert: Not the culprit for Canary microtask crashes Original change's description: > [builtins] Mega-revert to address the Dev blocker in crbug.com/808911. > > - Revert "[builtins] Save one word in contexts for Promise.all." > This reverts commit 7632da06. > - Revert "[builtins] Also use the Promise#then protector for Promise#finally()." > This reverts commit d4f072ce. > - Revert "[builtins] Don't mess with entered context for MicrotaskCallbacks." > This reverts commit 6703dacd. > - Revert "[debugger] Properly deal with settled promises in catch prediction." > This reverts commit 40dd0658. > - Revert "[builtins] Widen the fast-path for Promise builtins." > This reverts commit db0556b7. > - Revert "[builtins] Unify PerformPromiseThen and optimize it with TurboFan." > This reverts commit a582199c. > - Revert "[builtins] Remove obsolete PromiseBuiltinsAssembler::AppendPromiseCallback." > This reverts commit 6bf88852. > - Revert "[builtins] Turn NewPromiseCapability into a proper builtin." > This reverts commit 313b490d. > - Revert "[builtins] Inline InternalPromiseThen into it's only caller" > This reverts commit f7bd6a2f. > - Revert "[builtins] Implement Promise#catch by really calling into Promise#then." > This reverts commit b23b098f. > - Revert "[promise] Remove incorrect fast path" > This reverts commit 0f6eafe8. > - Revert "[builtins] Squeeze JSPromise::result and JSPromise::reactions into a single field." > This reverts commit 8a677a28. > - Revert "[builtins] Refactor promises to reduce GC overhead." > This reverts commit 8e7737cb. > > Tbr: hpayer@chromium.org > Bug: chromium:800651, chromium:808911, v8:5691, v8:7253 > Change-Id: I8c8ea5ed32ed62f6cd8b0d027a3707ddd891e5f1 > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng > Reviewed-on: https://chromium-review.googlesource.com/906991 > Commit-Queue: Yang Guo <yangguo@chromium.org> > Commit-Queue: Adam Klein <adamk@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> > Cr-Commit-Position: refs/heads/master@{#51158} Change-Id: I09d958cbebd635a325809072a290f2f53df8c5d4 Tbr: adamk@chromium.org,yangguo@chromium.org,bmeurer@chromium.org Bug: chromium:800651, chromium:808911, v8:5691, v8:7253 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Reviewed-on: https://chromium-review.googlesource.com/908988Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#51181}
-
- 07 Feb, 2018 1 commit
-
-
Benedikt Meurer authored
- Revert "[builtins] Save one word in contexts for Promise.all." This reverts commit 7632da06. - Revert "[builtins] Also use the Promise#then protector for Promise#finally()." This reverts commit d4f072ce. - Revert "[builtins] Don't mess with entered context for MicrotaskCallbacks." This reverts commit 6703dacd. - Revert "[debugger] Properly deal with settled promises in catch prediction." This reverts commit 40dd0658. - Revert "[builtins] Widen the fast-path for Promise builtins." This reverts commit db0556b7. - Revert "[builtins] Unify PerformPromiseThen and optimize it with TurboFan." This reverts commit a582199c. - Revert "[builtins] Remove obsolete PromiseBuiltinsAssembler::AppendPromiseCallback." This reverts commit 6bf88852. - Revert "[builtins] Turn NewPromiseCapability into a proper builtin." This reverts commit 313b490d. - Revert "[builtins] Inline InternalPromiseThen into it's only caller" This reverts commit f7bd6a2f. - Revert "[builtins] Implement Promise#catch by really calling into Promise#then." This reverts commit b23b098f. - Revert "[promise] Remove incorrect fast path" This reverts commit 0f6eafe8. - Revert "[builtins] Squeeze JSPromise::result and JSPromise::reactions into a single field." This reverts commit 8a677a28. - Revert "[builtins] Refactor promises to reduce GC overhead." This reverts commit 8e7737cb. Tbr: hpayer@chromium.org Bug: chromium:800651, chromium:808911, v8:5691, v8:7253 Change-Id: I8c8ea5ed32ed62f6cd8b0d027a3707ddd891e5f1 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Reviewed-on: https://chromium-review.googlesource.com/906991 Commit-Queue: Yang Guo <yangguo@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#51158}
-
- 02 Feb, 2018 2 commits
-
-
Caitlin Potter authored
A version of the spec change from https://github.com/tc39/ecma262/pull/988, but applied to the Async-from-Sync iterator type. This change does not modify generated bytecode (but maybe it should to take advantage of load IC feedback for loading "next"). Doing this grows bytecode by quite a bit, since it's necessary to throw-if-not-an-object before loading "next" (which currently gets to live in a code stub instead). BUG=v8:5855 Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: I0d2affef664d1069b24c54a553d62e17b49e5a16 Reviewed-on: https://chromium-review.googlesource.com/723136 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#51078}
-
Benedikt Meurer authored
This creates a uniform PerformPromiseThen builtin, which performs the operation with the same name from the spec, except that it expects the handlers to be either undefined or callable already, since this is only relevant for a single callsite (namely Promise.prototype.then). Introduce a matching operator JSPerformPromiseThen into TurboFan, which represents this operation and removes the additional checks in case of Promise.prototype.then based on the information we can derived from the receiver maps. This yields a nice 20-25% improvement on Promise.prototype.then, as illustrated by the following micro-benchmark ```js const N = 1e7; function inc(x) { return x + 1; } function chain(promise) { return promise.then(inc).then(value => { if (value < N) chain(Promise.resolve(value)); }); } console.time('total'); chain(Promise.resolve(0)); setTimeout(console.timeEnd.bind(console, 'total')); ``` which goes from around 1230ms to 930ms with this patch. Bug: v8:7253 Change-Id: I5712a863acdbe7da3bb8e621887c7b952148c51a Reviewed-on: https://chromium-review.googlesource.com/899064Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#51071}
-
- 11 Jul, 2017 1 commit
-
-
Camillo Bruni authored
Change-Id: Id3989d09f6adfb934842a9b0761d811117d69993 Reviewed-on: https://chromium-review.googlesource.com/567003 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#46568}
-
- 14 Jun, 2017 1 commit
-
-
jgruber authored
This completes refactoring started in 0a355777. Bug: v8:6474 Change-Id: Ia2ea66e10e4f1d55551fe145f67f4021ae254b23 Reviewed-on: https://chromium-review.googlesource.com/532997 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#45934}
-
- 12 Jun, 2017 1 commit
-
-
Jakob Gruber authored
Callables for TF builtins are autogenerated and accessible through Builtins::CallableFor. This removes the manually written accessors from CodeFactory. Bug: v8:6474,v8:5737 Change-Id: I9d8dec97995471c1bb258147220c190bf72e5de8 Reviewed-on: https://chromium-review.googlesource.com/530745Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#45839}
-
- 31 May, 2017 1 commit
-
-
jgruber authored
BUG=v8:5737 Review-Url: https://codereview.chromium.org/2913783002 Cr-Commit-Position: refs/heads/master@{#45629}
-
- 11 Apr, 2017 1 commit
-
-
Caitlin Potter authored
A really slight change in behaviour introduced by https://github.com/tc39/proposal-async-iteration/commit/395b2e3b2f5acb62f9fae11c5e189423d4af50e6 Just swaps the order that properties are loaded from an iterator result object in the various Async-from-Sync Iterator methods. Fixes for the test262 tests have been submitted already (https://github.com/tc39/test262/pull/961). BUG=v8:5855, v8:6242 R=littledan@chromium.org, jwolfe@igalia.com, Change-Id: I1ff0e1b7758c126d02aec27d67ceeb15b91c06cf Reviewed-on: https://chromium-review.googlesource.com/474087Reviewed-by: Daniel Ehrenberg <littledan@chromium.org> Commit-Queue: Caitlin Potter <caitp@igalia.com> Cr-Commit-Position: refs/heads/master@{#44572}
-
- 07 Apr, 2017 2 commits
-
-
Caitlin Potter authored
InternalResolvePromise, InternalPromiseReject and InternalPerformPromiseThen generate quite a lot of code. This change adds 3 new TF stubs which inline calls to these builtins. These stubs are invoked rather than inlining those operations listed above directly. This is done for Async Iteration builtins, as well as Async Function builtins. Promise builtins are left as they were, and continue to inline these calls. This results in a roughly 99kb reduction in snapshot_blob.bin on an x64 release build. BUG=v8:5855 R=gsathya@chromium.org, jgruber@chromium.org Change-Id: I83e2f096782db685fe316dd071980cd8d696fe53 Reviewed-on: https://chromium-review.googlesource.com/469927Reviewed-by: Franziska Hinkelmann <franzih@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#44483}
-
Camillo Bruni authored
Change-Id: If074bb297201470d688ecd7b01e5e9ce9bab464e Reviewed-on: https://chromium-review.googlesource.com/469730 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#44473}
-
- 06 Apr, 2017 3 commits
-
-
Franziska Hinkelmann authored
This reverts commit 9461fe24. Reason for revert: Breaks a test in Node.js: parallel/test-util-inspect === release test-util-inspect === Path: parallel/test-util-inspect # # Fatal error in , line 0 # unreachable code # ==== C stack trace =============================== Original change's description: > [builtins] don't inline calls for common Promise ops in async builtins > > InternalResolvePromise, InternalPromiseReject and > InternalPerformPromiseThen generate quite a lot of code. > > This change adds 3 new TF stubs which inline calls to these builtins. > These stubs are invoked rather than inlining those operations listed > above directly. This is done for Async Iteration builtins, as well as > Async Function builtins. Promise builtins are left as they were, and > continue to inline these calls. > > This results in a roughly 99kb reduction in snapshot_blob.bin on an x64 > release build. > > BUG=v8:5855 > R=gsathya@chromium.org, jgruber@chromium.org > > Change-Id: I3349d0f0353a72270ae40b974312d64d1c8a9e46 > Reviewed-on: https://chromium-review.googlesource.com/461269 > Commit-Queue: Caitlin Potter <caitp@igalia.com> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Reviewed-by: Sathya Gunasekaran (ooo until April 10) <gsathya@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/master@{#44445} TBR=mstarzinger@chromium.org,gsathya@chromium.org,caitp@igalia.com,jgruber@chromium.org,v8-reviews@googlegroups.com,bmeurer@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5855 Change-Id: Iabcdf8b025cc9b053a858f8e74389638ac000ba0 Reviewed-on: https://chromium-review.googlesource.com/469946Reviewed-by: Franziska Hinkelmann <franzih@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#44448}
-
Caitlin Potter authored
InternalResolvePromise, InternalPromiseReject and InternalPerformPromiseThen generate quite a lot of code. This change adds 3 new TF stubs which inline calls to these builtins. These stubs are invoked rather than inlining those operations listed above directly. This is done for Async Iteration builtins, as well as Async Function builtins. Promise builtins are left as they were, and continue to inline these calls. This results in a roughly 99kb reduction in snapshot_blob.bin on an x64 release build. BUG=v8:5855 R=gsathya@chromium.org, jgruber@chromium.org Change-Id: I3349d0f0353a72270ae40b974312d64d1c8a9e46 Reviewed-on: https://chromium-review.googlesource.com/461269 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Sathya Gunasekaran (ooo until April 10) <gsathya@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#44445}
-
Camillo Bruni authored
Change-Id: Ie84fbc26a3f3782564f3d0734c284f19a75853f3 Reviewed-on: https://chromium-review.googlesource.com/469826Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#44438}
-
- 29 Mar, 2017 1 commit
-
-
Caitlin Potter authored
- Introduce new struct AsyncGeneratorRequest, which holds information pertinent to resuming execution of an AsyncGenerator, such as the Promise associated with the async generator request. It is intended to be used as a singly linked list, and holds a pointer to the next item in te queue. - Introduce JSAsyncGeneratorObject (subclass of JSGeneratorObject), which includes several new internal fields (`queue` which contains a singly linked list of AsyncGeneratorRequest objects, and `await_input` which contains the sent value from an Await expression (This is necessary to prevent function.sent (used by yield*) from having the sent value observably overwritten during execution). - Modify SuspendGenerator to accept a set of Flags, which indicate whether the suspend is for a Yield or Await, and whether it takes place on an async generator or ES6 generator. - Introduce interpreter intrinsics and TF intrinsic lowering for accessing the await input of an async generator - Modify the JSGeneratorStore operator to understand whether or not it's suspending for a normal yield, or an AsyncGenerator Await. This ensures appropriate registers are stored. - Add versions of ResumeGeneratorTrampoline which store the input value in a different field depending on wether it's an AsyncGenerator Await resume, or an ordinary resume. Also modifies whether debug code will assert that the generator object is a JSGeneratorObject or a JSAsyncGeneratorObject depending on the resume type. BUG=v8:5855 R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org, littledan@chromium.org, neis@chromium.org TBR=marja@chromium.org Change-Id: I9d58df1d344465fc937fe7eed322424204497187 Reviewed-on: https://chromium-review.googlesource.com/446961 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#44240}
-
- 21 Mar, 2017 2 commits
-
-
Igor Sheludko authored
Second bulk of changes. BUG=v8:6116 Change-Id: I6297c4e3e1c0230a96dc6197691a54c07cc61c88 Reviewed-on: https://chromium-review.googlesource.com/457320 Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#43995}
-
jkummerow authored
BUG=v8:6055 Review-Url: https://codereview.chromium.org/2760953002 Cr-Commit-Position: refs/heads/master@{#43975}
-
- 16 Mar, 2017 1 commit
-
-
jkummerow authored
This is in preparation for linking the former only into mksnapshot. Just shuffling code around, no changes in functionality. BUG=v8:6055 Review-Url: https://codereview.chromium.org/2752143004 Cr-Commit-Position: refs/heads/master@{#43858}
-
- 24 Feb, 2017 1 commit
-
-
caitp authored
Introduce a new Object to allow GetIterator("async") to function when the iterable does not have a Symbol.asyncIterator method. This patch has been split out from https://codereview.chromium.org/2622833002/ and incorporates test cases. BUG=v8:5855, v8:4483 R=jgruber@chromium.org, rmcilroy@chromium.org, neis@chromium.org TBR=hpayer@chromium.org, bmeurer@chromium.org Review-Url: https://codereview.chromium.org/2645313003 Cr-Commit-Position: refs/heads/master@{#43419}
-