v8/test/mjsunit/regress/regress-774475.js
Marja Hölttä d69159d52d [parser] Skipping inner funcs: fix related to aborting preparsing.
When skipping inner funcs is enabled, we also track variables for top level
funcs. Thus, we also declared the function name for the function scope, even
though it was the function scope for a function whose preparsing was
aborted. This lead into declaring the function name twice.

The fix is to declare the function name only in the success case.

The code was "wrong" before too, but this was never a problem, since variable
tracking and aborting preparsing were enabled for disjoint sets of
functions (aborting preparsing only for top-level, and variable tracking for
non-top-level).

BUG=v8:5516,chromium:774475

Change-Id: Ie6c321cc834cd946e8843f73916fa7dd75e9cd09
Reviewed-on: https://chromium-review.googlesource.com/720920
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48592}
2017-10-16 13:31:49 +00:00

939 lines
8.4 KiB
JavaScript

// Copyright 2017 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.
var o = function f3() {
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
x = 1;
}