v8/test/mjsunit/regress/regress-1231901.js
Jakob Gruber e8fd93689e [compiler] Thread-safe Map::ComputeMinObjectSlack
ComputeMinObjectSlack is called concurrently from background threads
(when --concurrent-inlining) and must therefore be thread-safe.

This CL adds a compiler-specific thread-safe variant
of ComputeMinObjectSlack in addition to the plain old non-thread-safe
one. Thread-safety is achieved through locking: on the bg thread, a
shared lock when traversing transitions, and on the main thread, an
additional exclusive critical section when overwriting prototype
transitions.

Tbr: leszeks@chromium.org
Bug: v8:7790,v8:12010,chromium:1231901
Change-Id: If5af83df1ab896b22477921449fb5ba4c8d3e8a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3045342
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75949}
2021-07-28 06:05:36 +00:00

39 lines
783 B
JavaScript

// Copyright 2021 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: --allow-natives-syntax --interrupt-budget=100
function __f_9() {}
function __f_10() {}
function f(a, b) {
if (b) {
new __f_10().__proto__ = a;
} else {
__f_10.prototype = a;
}
}
function g(a, b, c) {
var d = a ? new __f_9() : {};
if (b) { g(d); }
f(d, c);
}
g(false, true, false);
g(false, false, false);
g(false, false, false, undefined);
g(false, true, true);
g(false, false, true);
g(false, false, true, undefined);
g(true, true, false);
g(true, false, false);
g(true, false, false, undefined);
g(true, true, true);
g(true, false, true);
g(true, false, true, undefined);