Scopes: Algorithm for computing original stack frames#219
Scopes: Algorithm for computing original stack frames#219hbenl wants to merge 1 commit intotc39:proposal-scopesfrom
Conversation
705d528 to
bf3765c
Compare
|
Thanks for writing up the algorithm! I had a cursory initial look. IMHO Rather then having one catch all abstract operation I suggest we spec out some basic building blocks. Concretely I suggest the following 3 "entry point operations":
|
|
Thanks for the feedback!
|
Good point, my implementation and this PR currently work with only one generated source. |
|
I think this can be emulated using Runtime.callFunctionOn. |
Nice!
OK, we could use "evaluate in this scope" in the algorithm and then append a description how "evaluate in this scope" can be emulated using "evaluate with bindings". |
I'm not sure how'd you create the bindings object in the first place. You'd still need to read the values for generated variables off the stack or out of closure contexts. Debugger.evaluateOnCallFrame has this built-in by basically building At least from a V8 and Chrome DevTools perspective it would be much easier to just extend |
60e0844 to
22dd1da
Compare
|
I have added the suggested |
93ea159 to
71e76ab
Compare
6f507e6 to
6fa9a38
Compare
6fa9a38 to
eb3cce9
Compare
Preview
This is an initial draft of the algorithm for computing original stack frames (implemented here).
This PR makes use of
GetOriginalPositionfrom #195.TODO:
handle multiple generated sources and sourcemapshandle outlined functions