58761221af
This deletes unresolved VariableProxy objects created for labels in the preparser which prevents shadowed variables in enclosing scopes from being context-allocated. Previously this was only done in the full parser, which leads to bytecode mismatches with lazy source positions. Bug: chromium:1009728, v8:8510 Change-Id: If2d0c345346116a7f5aacbcd0cf3638e9f7e04cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1836258 Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#64104}
16 lines
306 B
JavaScript
16 lines
306 B
JavaScript
// Copyright 2019 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.
|
|
|
|
// Flags: --stress-lazy-source-positions
|
|
|
|
function foo(x) {
|
|
(function bar() {
|
|
{
|
|
x: 1
|
|
}
|
|
function f() {}
|
|
});
|
|
}
|
|
foo();
|