Description[es6] Self-assignment in a default parameter initializer should throw
The first bug was that there are two different "initialization positions"
passed into PatternRewriter::DeclareAndInitializeVariables, and we weren't
setting them all properly for this case.
After further code review, it became clear that we weren't even recording
the correct position (the end of the initializer expression).
The combination of those two bugs caused the hole check elimination code
in full-codegen to skip emitting a hole check.
This patch takes care of both of those things. A follow-up will try
to reduce the number of "initializer positions" we track in the
variable declaration code.
R=littledan@chromium.org
BUG=v8:4568
LOG=n
Committed: https://crrev.com/b6e9f625c17f3a688139426771e2cb34fbdcb46e
Cr-Commit-Position: refs/heads/master@{#32237}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Handle more complex expressions, arrow functions #Patch Set 3 : Split out the two uses of initializer #Patch Set 4 : Change less behavior, add TODO #
Messages
Total messages: 11 (2 generated)
|