0403beb4bb
This is a reland of cdc8d9a5ec
Skipped tests on gc_stress and fixed CONSTEXPR_DCHECK for gcc.
Original change's description:
> [TurboProp] Avoid marking the output of a call live in its catch handler
>
> The output of a call won't be live if an exception is thrown while the
> call is on the stack and we unwind to a catch handler.
>
> BUG=chromium:1138075,v8:9684
>
> Change-Id: I95bf535bac388940869eb213e25565d64fe96df1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2476317
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70562}
Bug: chromium:1138075
Bug: v8:9684
Change-Id: I685c94ee2ffcf06658df07fcef06f58c4f01f54b
Cq-Include-Trybots: luci.v8.try:v8_linux64_gcc_compile_dbg
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2479009
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70573}
28 lines
597 B
JavaScript
28 lines
597 B
JavaScript
// Copyright 2020 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 --turboprop --max-semi-space-size=1
|
|
|
|
function runNearStackLimit(f) {
|
|
function t() {
|
|
try {
|
|
return t();
|
|
} catch (e) {
|
|
return f();
|
|
}
|
|
}
|
|
%PrepareFunctionForOptimization(t);
|
|
%OptimizeFunctionOnNextCall(t);
|
|
return t();
|
|
}
|
|
|
|
function foo(a) {}
|
|
function bar(a, b) {}
|
|
|
|
for (let i = 0; i < 150; i++) {
|
|
runNearStackLimit(() => {
|
|
return foo(bar(3, 4) === false);
|
|
});
|
|
}
|