1. 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
  2. 22 Mar, 2017 1 commit
  3. 09 Mar, 2017 1 commit
  4. 28 Feb, 2017 1 commit
  5. 20 Feb, 2017 1 commit
  6. 17 Feb, 2017 1 commit
  7. 07 Feb, 2017 3 commits
  8. 25 Jan, 2017 1 commit
  9. 18 Jan, 2017 1 commit
  10. 17 Jan, 2017 1 commit
    • neis's avatar
      [generators] Always call function with closure context when resuming. · c5948b98
      neis authored
      The resume trampolin used to call the generator function with the context of the
      last suspension rather than the closure's context.  While that was fine for
      Ignition, Turbofan got utterly confused.  With this CL, the resume trampolin
      always passes in the closure's context (like in the very first call of the
      generator function).  The generator function itself then restores its previously
      current context by reading it from the generator object and doing a
      PushContext.
      
      BUG=chromium:681171
      
      Review-Url: https://codereview.chromium.org/2639533002
      Cr-Commit-Position: refs/heads/master@{#42407}
      c5948b98
  11. 11 Jan, 2017 1 commit
  12. 10 Jan, 2017 1 commit
  13. 09 Jan, 2017 1 commit
  14. 04 Jan, 2017 1 commit
    • adamk's avatar
      [ignition] Only initialize [[HomeObject]] for class constructors if needed · 3e20d381
      adamk authored
      This moves the initialization of [[HomeObject]] for constructors from
      the %DefineClass runtime function into the bytecode generator, and
      makes it conditional (resolving an old TODO). As part of this refactor,
      avoid a load of "prototype" by returning the class prototype from
      %DefineClass.
      
      This is one of many steps in moving more of class definition into
      bytecode.
      
      R=rmcilroy@chromium.org
      
      Review-Url: https://codereview.chromium.org/2610683003
      Cr-Commit-Position: refs/heads/master@{#42072}
      3e20d381
  15. 22 Dec, 2016 1 commit
  16. 21 Dec, 2016 1 commit
    • mvstanton's avatar
      [TypeFeedbackVector] Root literal arrays in function literals slots · 93df0940
      mvstanton authored
      Literal arrays and feedback vectors for a function can be garbage
      collected if we don't have a rooted closure for the function, which
      happens often. It's expensive to come back from this (recreating
      boilerplates and gathering feedback again), and the cost is
      disproportionate if the function was inlined into optimized code.
      
      To guard against losing these arrays when we need them, we'll now
      create literal arrays when creating the feedback vector for the outer
      closure, and root them strongly in that vector.
      
      BUG=v8:5456
      
      Review-Url: https://codereview.chromium.org/2504153002
      Cr-Commit-Position: refs/heads/master@{#41893}
      93df0940
  17. 15 Dec, 2016 1 commit
    • rmcilroy's avatar
      [Interpreter] Allocate registers used as call arguments on-demand. · ae741d04
      rmcilroy authored
      Allocate the registers used as arguments to a call on-demand after visiting the
      argument (or reciever). This means that the visited expression can use registers
      that would otherwise have been allocated for arguments which haven't been
      visited yet.
      
      The reason for doing this is to avoid keeping things live in registers
      unecessarily for chained function calls, which avoids a memory leak for
      functions which chain a large number of calls with large temporary arguments /
      recievers.
      
      BUG=chromium:672027
      
      Review-Url: https://codereview.chromium.org/2557173004
      Cr-Commit-Position: refs/heads/master@{#41714}
      ae741d04
  18. 07 Dec, 2016 2 commits
    • caitp's avatar
      [ignition] desugar GetIterator() via bytecode rather than via AST · b5f146a0
      caitp authored
      Introduces:
      - a new AST node representing the GetIterator() algorithm in the specification, to be used by ForOfStatement, YieldExpression (in the case of delegating yield*), and the future `for-await-of` loop proposed in http://tc39.github.io/proposal-async-iteration/#sec-async-iterator-value-unwrap-functions.
      - a new opcode (JumpIfJSReceiver), which is useful for `if Type(object) is not Object` checks which are common throughout the specification. This node is easily eliminated by TurboFan.
      
      The AST node is desugared specially in bytecode, rather than manually when building the AST. The benefit of this is that desugaring in the BytecodeGenerator is much simpler and easier to understand than desugaring the AST.
      
      This also reduces parse time very slightly, and allows us to use LoadIC rather than KeyedLoadIC, which seems to have  better baseline performance. This results in a ~20% improvement in test/js-perf-test/Iterators micro-benchmarks, which I believe owes to the use of the slightly faster LoadIC as opposed to the KeyedLoadIC in the baseline case. Both produce identical optimized code via TurboFan when the type check can be eliminated, and the load can be replaced with a constant value.
      
      BUG=v8:4280
      R=bmeurer@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, neis@chromium.org, jarin@chromium.org
      TBR=rossberg@chromium.org
      
      Review-Url: https://codereview.chromium.org/2557593004
      Cr-Commit-Position: refs/heads/master@{#41555}
      b5f146a0
    • henrique.ferreiro's avatar
      Install the 'name' property in classes at runtime · afd5ff55
      henrique.ferreiro authored
      This allows to detect a static property also named 'name', and also makes sure 'name' is added last, to be standards-compliant.
      
      BUG=v8:4199
      
      Review-Url: https://codereview.chromium.org/2423053002
      Cr-Commit-Position: refs/heads/master@{#41546}
      afd5ff55
  19. 15 Nov, 2016 1 commit
  20. 10 Nov, 2016 1 commit
  21. 09 Nov, 2016 1 commit
  22. 08 Nov, 2016 1 commit
  23. 07 Nov, 2016 1 commit
    • neis's avatar
      [modules] Maintain array of cells for imports and local exports. · 21463f73
      neis authored
      This makes use of the newly introduced cell indices to speed up variable
      accesses. Imports and local exports are now directly stored in (separate)
      arrays. In the future, we may merge the two arrays into a single one, or
      even into the module context.
      
      This CL also replaces the LoadImport and LoadExport runtime functions with
      a single LoadVariable taking a variable index as argument (rather than a
      name).
      
      BUG=v8:1569
      
      Review-Url: https://codereview.chromium.org/2465283004
      Cr-Commit-Position: refs/heads/master@{#40808}
      21463f73
  24. 02 Nov, 2016 1 commit
  25. 28 Oct, 2016 1 commit
  26. 20 Oct, 2016 2 commits
  27. 17 Oct, 2016 1 commit
  28. 04 Oct, 2016 1 commit