5bf9e470f8
Since we use a ScopedPtrList to track cover grammar expressions we don't know the position of the commas anymore. The position of the commas was used to demark the initializer, which is needed to figure out whether we need hole checks for variable references. (Typically only references within the initializer need hole checks for the initialized variable.) Since we didn't have the comma position, we simply used the position of the first expression as the position of any subsequent comma, which would make it seem as if the initializer body wasn't in the initializer. Now instead we simply use the position of the subsequent parameter as the end of the initializer, which is close enough. Bug: chromium:902810 Change-Id: I8d2bc7a2dc9f59db16ce56ccef01e263a18a3b7a Reviewed-on: https://chromium-review.googlesource.com/c/1326022 Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#57357}
6 lines
242 B
JavaScript
6 lines
242 B
JavaScript
// Copyright 2018 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
assertThrows("((__v_4 = __v_4, __v_0) => eval(__v_4))()", ReferenceError)
|