1. 05 Oct, 2018 1 commit
  2. 29 Sep, 2018 1 commit
    • Benedikt Meurer's avatar
      [async-await] Unify handling of await closure contexts. · 9e99297e
      Benedikt Meurer authored
      Change the way that the (internal) await closures store the link to the
      generator object by introducing a dedicated AwaitContext, which stores
      the generator object into the extension slot (instead of misusing a
      regular FunctionContext here). Also unify the allocation+initialization
      of these contexts in the await-related builtins (both for async functions
      and generators).
      
      The rationale behind this is that for (zero-cost) async stack traces, we
      will need to dig into these contexts and we can do better checking with
      a dedicated instance type there. As an additional benefit, we save one
      word per await context, since we just use (the otherwise unused) extension
      slot to remember the generator object. As yet another benefit we will
      never accidentally use any of these contexts in the regular scope chain
      lookups, meaning we can also catch bugs there. And last but not least
      the objects printing machinery understands these contexts now and can
      even print the generator object for AwaitContexts for short printing,
      which is really valuable for debugging.
      
      Tbr: ulan@chromium.org
      Bug: v8:7253, v8:7522, v8:8015
      Change-Id: I86955f5701e694e8a10b91ebe5f52705aa90968d
      Reviewed-on: https://chromium-review.googlesource.com/1249491Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56301}
      9e99297e
  3. 20 Jun, 2018 1 commit
    • Maya Lekova's avatar
      Reland "[async] Optimize await and AsyncFromSyncIterator" · ef8c1861
      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: 's avatarSathya Gunasekaran <gsathya@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53900}
      ef8c1861
  4. 19 Jun, 2018 2 commits
  5. 14 May, 2018 1 commit
  6. 19 Feb, 2018 1 commit
  7. 02 Feb, 2018 1 commit
  8. 09 Aug, 2017 1 commit
  9. 08 Aug, 2017 1 commit
  10. 30 Jun, 2017 1 commit
  11. 29 Mar, 2017 1 commit
    • Caitlin Potter's avatar
      [async-iteration] implement AsyncGenerator · bf463c4d
      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: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44240}
      bf463c4d
  12. 21 Mar, 2017 1 commit
  13. 16 Mar, 2017 1 commit
  14. 20 Jan, 2017 1 commit
  15. 18 Jan, 2017 1 commit