• Caitlin Potter's avatar
    [generators] remove SuspendFlags enum and related code · 53553f5d
    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: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46683}
    53553f5d
access-builder.h 11 KB