DescriptionMake non-Module generators only context allocate parameters.
In particular, local variables should be allocated on stack (in bytecode register), and stored/loaded to the generator object on generator suspend/resume.
The CL is based on @adamk's change to scoping/parsers (https://chromium-review.googlesource.com/c/498538/), I only made the debugger cope with this change.
I should note that the CL changes the scope type of suspended generators from ScopeType.Closure to ScopeType.Local. In the future we might want to introduce ScopeType.SuspendedGenerator to make the distinction explicit.
Some of the changes in the tests have been made because the debugger functions do not return scopes of closed generators anymore. Generators should be allowed to throw away their internal state when they finish.
BUG=v8:6368
Review-Url: https://codereview.chromium.org/2898163002
Cr-Commit-Position: refs/heads/master@{#45515}
Committed: https://chromium.googlesource.com/v8/v8/+/a957b0f42468d632b09574e3d6719c704eebbfea
Patch Set 1 : Adam's change of scoping for generator locals #Patch Set 2 : Fix debugger #Patch Set 3 : Regolden #Patch Set 4 : Tweak #Patch Set 5 : Disable tests that assign to optimized variables #Patch Set 6 : Disable optimization for the debugger test #Patch Set 7 : Now disable opt in the correct file? #Patch Set 8 : More flag magic #
Total comments: 4
Patch Set 9 : Fix comment #
Total comments: 24
Patch Set 10 : Address review comments #Patch Set 11 : Rebase #Messages
Total messages: 56 (43 generated)
|