- 07 Sep, 2017 1 commit
-
-
Ross McIlroy authored
JS runtime calls are always created with undefined recievers, so make the bytecode behave similarly to CallUndefinedReciever such that we don't need to push an explicit undefined register for the receiver for such calls. Modifies the Async[Generator/Function]Await[Caught/Uncaught] runtime calls to pass the generator in the first argument rather than the reciever since these runtime calls were desugered in the bytecode generator and explicitly passed the generator in the receiver. Change-Id: I36c8087bb3b663dccd805bfdb1eea04eb6a73269 Reviewed-on: https://chromium-review.googlesource.com/654257Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#47870}
-
- 28 Aug, 2017 1 commit
-
-
Sathya Gunasekaran authored
Instead of using a word to store the status of the promise, this patch uses 2 bit on flags. Bug: v8:5046 Change-Id: Ic651338230dbe1704c68de8652676f236a3298f0 Reviewed-on: https://chromium-review.googlesource.com/634623 Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#47628}
-
- 09 Aug, 2017 1 commit
-
-
Caitlin Potter authored
AsyncGenerators, when resumed with a "return" completion, Await the sent value to provide consistency with syntactic return statements. This moves the await to during AsyncGeneratorResumeNext, shrinking the number of bytecodes. There's a minor change to BytecodeGenerator which removes a %_GeneratorClose() call, since it's inserted implicitly by the parser. BUG=v8:5855 TBR=neis@chromium.org Change-Id: I2965c610e5985ac24c713b481e62f6b97f96a3d8 Reviewed-on: https://chromium-review.googlesource.com/582218 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#47253}
-
- 08 Aug, 2017 1 commit
-
-
Caitlin Potter authored
A spec change (https://github.com/tc39/proposal-async-iteration/commit/a0dfeba1a8029012b6e964099929b8a157818c9f) introduced a number of Await operations to the spec. In turn, this caused generated bytecode for async generators to grow drastically. This commit moves the Await within AsyncGeneratorYield (https://tc39.github.io/proposal-async-iteration/#sec-asyncgeneratoryield step 5) into a new TFJ builtin, similar in structure to AsyncGeneratorAwait, but instead of resuming the generator on resolution of the Promise, the current generator request's Promise is fulfilled instead. This results in a reduction in generated bytecode without losing any statically available information. BUG=v8:5855 Change-Id: Ib5bcf06132d221beffdea30639a7b4437030143b Reviewed-on: https://chromium-review.googlesource.com/582487 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#47224}
-
- 01 Aug, 2017 1 commit
-
-
Caitlin Potter authored
Per https://github.com/tc39/proposal-async-iteration/pull/102/files: AsyncGeneratorResolve no longer unwraps a value component. Instead, the value is unwrapped before the builtin call via Await, allowing Promise rejections to affect the generator control flow. Thus, all `yield <expr>` implicitly become `yield await <expr>`. Additionally, `return <expr>` becomes `return await <expr>`. Finally, when the generator is resumed with `.return()`, the parameter passed to .return() is awaited before generator execution properly continues). BUG=v8:6187, v8:5855 R=littledan@chromium.org, neis@chromium.org, adamk@chromium.org TBR=rmcilroy@chromium.org, neis@chromium.org Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Change-Id: Id7718028fd555481f9f4ca0dbecfa788e3057c48 Reviewed-on: https://chromium-review.googlesource.com/594500Reviewed-by: Caitlin Potter <caitp@igalia.com> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Caitlin Potter <caitp@igalia.com> Cr-Commit-Position: refs/heads/master@{#47058}
-
- 31 Jul, 2017 2 commits
-
-
Michael Achenbach authored
This reverts commit 409f84c9. Reason for revert: Breaks nosnap debug: https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/14288 Original change's description: > [async-iteration] implement spec-change to `yield` in async generators > > Per https://github.com/tc39/proposal-async-iteration/pull/102/files: > > AsyncGeneratorResolve no longer unwraps a value component. Instead, the > value is unwrapped before the builtin call via Await, allowing Promise > rejections to affect the generator control flow. > > Thus, all `yield <expr>` implicitly become `yield await <expr>`. > > Additionally, `return <expr>` becomes `return await <expr>`. Finally, when > the generator is resumed with `.return()`, the parameter passed to .return() > is awaited before generator execution properly continues). > > BUG=v8:5855 > R=littledan@chromium.org, neis@chromium.org, adamk@chromium.org > > Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng > Change-Id: Ife084076c3ed434b5467e6aeba14082f8b410ad5 > Reviewed-on: https://chromium-review.googlesource.com/523844 > Commit-Queue: Caitlin Potter <caitp@igalia.com> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Reviewed-by: Georg Neis <neis@chromium.org> > Cr-Commit-Position: refs/heads/master@{#47011} TBR=rmcilroy@chromium.org,adamk@chromium.org,yangguo@chromium.org,neis@chromium.org,littledan@chromium.org,gsathya@chromium.org,caitp@igalia.com Change-Id: Ie6ad7e5410a3a89aab7a5dc68de36eb27b9354fe No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:5855 Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Reviewed-on: https://chromium-review.googlesource.com/593952Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#47013}
-
Caitlin Potter authored
Per https://github.com/tc39/proposal-async-iteration/pull/102/files: AsyncGeneratorResolve no longer unwraps a value component. Instead, the value is unwrapped before the builtin call via Await, allowing Promise rejections to affect the generator control flow. Thus, all `yield <expr>` implicitly become `yield await <expr>`. Additionally, `return <expr>` becomes `return await <expr>`. Finally, when the generator is resumed with `.return()`, the parameter passed to .return() is awaited before generator execution properly continues). BUG=v8:5855 R=littledan@chromium.org, neis@chromium.org, adamk@chromium.org Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng Change-Id: Ife084076c3ed434b5467e6aeba14082f8b410ad5 Reviewed-on: https://chromium-review.googlesource.com/523844 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#47011}
-
- 14 Jul, 2017 2 commits
-
-
Caitlin Potter authored
SuspendFlags was originally used by the suspend operation to determine which field to record the bytecode offset of a suspended generator, and the value the generator was resumed with. For async generators, await operations would use a separate field, in order to preserve the previous yield input value. This was important to ensure `function.sent` continued to function correctly. As function.sent is being retired, this allows the removal of support for that. Given that this was the only real need for SuspendFlags in the first place (with other uses tacked on as a hack), this involves several other changes as well: - Modification of MacroAssembler AssertGeneratorObject. No longer accepts a SuspendFlags parameter to determine which type of check to perform. - Removal of `flags` operand from SuspendGenerator bytecode, and the GeneratorStore js-operator. - Removal of `flags` parameter from ResumeGeneratorTrampoline builtins. - Removal of Runtime functions, interpreter intrinsics and AccessBuilders associated with the [[await_input_or_debug_pos]] field in JSAsyncGeneratorObject, as this field no longer exists. - Addition of a new `Yield` AST node (subclass of Suspend) in order to prevent the need for the other SuspendFlag values. BUG=v8:5855 TBR=bmeurer@chromium.org Change-Id: Iff2881e4742497fe5b774915e988c3d9d8fbe487 Reviewed-on: https://chromium-review.googlesource.com/570485 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#46683}
-
Caitlin Potter authored
This includes several changes. From most to least interesting: - No longer implement AwaitExpressions using a do-expression. - Reduces frame-size of async generators by not allocating temporary variables to hold results of Await epxressions. - Streamline and reduce generated bytecodes for Await. - Debugger no longer emits a debug::kCallBreakLocation breakpoint for the JS-builtin call performed for Await, and instead only emits such a breakpoint if the operand of Await is actually a call. - Push fewer parameters to Await* builtins, using the receiver for the first parameter (possible now that the CallRuntime invocation not part of the AST). - Adds a new Await AST node. No new members or anything, but it seemed palatable to avoid having `if (is_await())` in a number of VisitSuspend functions. BUG=v8:5855, v8:5099, v8:4483 R=rmcilroy@chromium.org, kozyatinskiy@chromium.org, yangguo@chromium.org TBR=bmeurer@chromium.org Change-Id: I9cd3fda99cd40295c04fdf1aea01b5d83fac6caf Reviewed-on: https://chromium-review.googlesource.com/558806 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Cr-Commit-Position: refs/heads/master@{#46666}
-
- 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}
-
- 30 Jun, 2017 1 commit
-
-
Caitlin Potter authored
Allocates the Await success/failure closures, their context, and the two required JSPromise objects all at once in a single call, rather than performing multiple allocations throughout the function. Saves about 2kb of snapshot space on an x64.release build. Performance impact of this change has not been measured yet. BUG=v8:4483 R=ishell@chromium.org, jgruber@chromium.org Change-Id: I8d911cb91f5d0e00544ad3ba608aa170f6b2f704 Reviewed-on: https://chromium-review.googlesource.com/549999Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Caitlin Potter <caitp@igalia.com> Cr-Commit-Position: refs/heads/master@{#46360}
-
- 19 Jun, 2017 1 commit
-
-
jgruber authored
Mechanical change to remove argument adaption (should be a tad faster this way). Especially next is called without arguments in the common case. Bug: v8:6354, v8:6369 Change-Id: I4180caabfc4c1bbf1a10a881dcbcd41e03614b27 Reviewed-on: https://chromium-review.googlesource.com/535453 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Caitlin Potter <caitp@igalia.com> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#46000}
-
- 31 May, 2017 1 commit
-
-
jgruber authored
BUG=v8:5737 Review-Url: https://codereview.chromium.org/2913783002 Cr-Commit-Position: refs/heads/master@{#45629}
-
- 24 Apr, 2017 1 commit
-
-
Caitlin Potter authored
The AsyncGeneratorYield builtin just invoked the AsyncGeneratorResolve() stub anyways, so this removes the middle-man. Really minor refactoring, but clears out a bit of snapshot size and another context index. BUG=v8:5855 R=rmcilroy@chromium.org, bmeurer@chromium.org Change-Id: I3385a5c5412e8d58493601874c2ad6b60e613012 Reviewed-on: https://chromium-review.googlesource.com/471913 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#44820}
-
- 13 Apr, 2017 1 commit
-
-
Caitlin Potter authored
https://github.com/tc39/proposal-async-iteration/commit/e3246ad69cc6f83b34bdd3451c3c6abce37fd1f3 removed some redundancies in yield and yield*. In particular: - AsyncGeneratorRawYield becomes unnecessary, and is deleted in this CL - Parser::RewriteYieldStar() is updated to perform the IteratorValue() algorithm as appropriate BUG=v8:6187, v8:5855 R=rmcilroy@chromium.org, adamk@chromium.org, littledan@chromium.org, vogelheim@chromium.org Change-Id: I05e8429b9cbd4531c330ee53a05656b90162064c Reviewed-on: https://chromium-review.googlesource.com/471806Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org> Commit-Queue: Caitlin Potter <caitp@igalia.com> Cr-Commit-Position: refs/heads/master@{#44649}
-
- 07 Apr, 2017 3 commits
-
-
jgruber authored
Split TFS builtins into * TFC: TF builtins with stub linkage that use a custom interface descriptor (e.g. because of a non-standard return size or untagged arguments) * TFS: the rest. Automatically generate interface descriptors for TFS builtins to reduce boilerplate involved in setting up stub calls. These are now as simple as creating the TFS stub and using CSA::CallBuiltin, no extra work required. BUG=v8:6116 Review-Url: https://codereview.chromium.org/2777203007 Cr-Commit-Position: refs/heads/master@{#44490}
-
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 2 commits
-
-
Caitlin Potter authored
This hopefully shrinks binary size a bit, at the cost of (slightly) increasing the complexity of the ResumeGenerator stub. Includes ia32, x64, mips, mips64, arm and arm64 ports. BUG=v8:5855 R=rmcilroy@chromium.org, paul.lind@imgtec.com, bmeurer@chromium.org, neis@chromium.org Change-Id: I848ce08afd828091a11e03c89d5be065ff557ef3 Reviewed-on: https://chromium-review.googlesource.com/461303 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#44244}
-
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}
-