a757a62bf5
This makes the elimination of checkpoints flowing effect-wise into nodes having the {Return} operator more permissive. We can cut out checkpoints even when they are not wholly owned by the return. This also alleviates a problem where TCO no longer applies. R=jarin@chromium.org TEST=mjsunit/regress/regress-crbug-624747 BUG=chromium:624747 Review-Url: https://codereview.chromium.org/2118793002 Cr-Commit-Position: refs/heads/master@{#37480}
23 lines
468 B
JavaScript
23 lines
468 B
JavaScript
// Copyright 2016 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 --es-staging
|
|
|
|
"use strict";
|
|
|
|
function bar() {
|
|
try {
|
|
unref;
|
|
} catch (e) {
|
|
return (1 instanceof TypeError) && unref(); // Call in tail position!
|
|
}
|
|
}
|
|
|
|
function foo() {
|
|
return bar(); // Call in tail position!
|
|
}
|
|
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo();
|