This CL changes the test helpers that encode the source map scopes
proposal. Rathern than passing indices into the "names" array, we now
pass the "names" array to the builder constructor and the builders
handle resolving indices internally themselves.
This makes builder code slightly more readable for original scope
names, original variable names and binding expressions.
R=pfaffe@chromium.org
Bug: 40277685
Change-Id: I810dd81b22c4223d4585a7ca3c8db48160b1b52c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5713234
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
This CL adds the last, and arguably most complicated bit, of the
"Scopes" proposal: bindings. Bindings encode what expression to use
to produce the value of a variable in a given generated range.
Since the expression might not be the same throughout the whole range,
the encoding allows for sub-ranges. This means that a binding for a
given variable could either be a single expression or a list of
sub-ranges with each sub-range having their own expression.
R=pfaffe@chromium.org
Bug: 40277685
Change-Id: I879caed0ecf8bc377b600357ffd98989650ebb34
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5598789
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
This CL adds decoding of "definitions" of generated ranges. A
definition is a source file index plus a scope index where the
scope index references the index of the corresponding "start" item.
For now, we flatten out the resulting scope tree manually and insert
'null' for end items. If this becomes performance critical we can
construct an array or a map (index -> OriginalScope) as
we decode the original scopes themselves.
R=pfaffe@chromium.org
Bug: 40277685
Change-Id: I5a86c1fdfc7af330fce3d37f2854c9fa734aac78
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5554234
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
This CL implements basic decoding of generated range start/end item.
Currently missing are the additional fields encoded in start items,
namely definition (the corresponding original scope), call site (for
inlining) and binding information.
We'll implement those in follow-up CLs. To keep CLs reasonable.
R=pfaffe@chromium.org
Bug: 40277685
Change-Id: Ia6daa1e0248beadb22bd2e71714fb33d5ff80552
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5349141
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>