v8/test/inspector/debugger/suspended-generator-scopes-expected.txt
jarin a957b0f424 Make 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}
2017-05-24 13:54:57 +00:00

66 lines
1.5 KiB
Plaintext

Tests that suspended generators produce scopes
Running test: testScopesPaused
{
id : <messageId>
result : {
result : [
[0] : {
configurable : true
enumerable : true
isOwn : true
name : b
value : {
description : 42
type : number
value : 42
}
writable : true
}
[1] : {
configurable : true
enumerable : true
isOwn : true
name : a
value : {
description : 420
type : number
value : 420
}
writable : true
}
]
}
}
Running test: testScopesNonPaused
{
id : <messageId>
result : {
result : [
[0] : {
configurable : true
enumerable : true
isOwn : true
name : b
value : {
type : undefined
}
writable : true
}
[1] : {
configurable : true
enumerable : true
isOwn : true
name : a
value : {
description : 430
type : number
value : 430
}
writable : true
}
]
}
}