DescriptionUse Scope::function_kind_ to distinguish arrow function scopes
Previously, arrow function scopes had a separate ScopeType. However,
Scope::DeserializeScopeChain() erroneously deserialized ARROW_SCOPE
ScopeInfos as FUNCTION_SCOPE. This could lead to bugs such as the
attached one, where "super" was disallowed where it should have
been allowed.
This patch utilizes the Scope's FunctionKind to distinguish arrow
functions from others. Besides fixing the above bug, this also
simplifies code in various places that had to deal with two different
ScopeTypes both of which meant "function".
BUG=v8:4466
LOG=n
Committed: https://crrev.com/24565b859869f8867059b7120f27a25d785f2850
Cr-Commit-Position: refs/heads/master@{#31154}
Patch Set 1 #
Total comments: 2
Messages
Total messages: 11 (2 generated)
|