Skip to content

v1.0.1705227

@szuend szuend tagged this 28 Sep 06:09
This is a reland of commit d6176b6831e458e90e795ff881fc949ef2f0fd19

Original change's description:
> [scopes] Pass generated names per scope to Substitute.ts
>
> The name-based fallback in NamesResolver discovers mappings as
> generated name -> authored name and flips them for Substitute.ts.
> When multiple generated names in a scope map to the same authored
> name, all but one are dropped. Substitute.ts infers the generated
> names declared by a scope from the free identifiers of its binding
> expressions, so dropped names never shadow outer bindings. This
> could substitute an outer variable with an inner generated
> identifier and silently evaluate the wrong variable.
>
> Pass a `ScopeVariableMapping` per scope instead, which carries the
> generated names declared by the scope next to the bindings.
> Substitute.ts treats those as shadowing, in addition to the free
> identifiers of the bindings. The fallback path reports all bound
> identifiers of the generated scope, which also covers generated
> names we couldn't map at all. The source map scopes path passes an
> empty list, as the scopes info doesn't tell us the declared names.
>
> R=alexrudenko@chromium.org
>
> Fixed: 565178115
> Change-Id: I5d1fd7d501d44ca508de39ba0b779fd8c6c09930
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/8460092
> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>

Fixed: 565178115
Change-Id: Icf2cd8a226c50c5414a95cdf1168d8d23fd67065
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/8466748
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Assets 2
Loading