Commit 101260d3 authored by jarin's avatar jarin Committed by Commit bot

Ship try-finally optimization in Turbofan.

Review URL: https://codereview.chromium.org/1920883003

Cr-Commit-Position: refs/heads/master@{#35804}
parent f356efcf
......@@ -324,7 +324,7 @@ void AstNumberingVisitor::VisitTryCatchStatement(TryCatchStatement* node) {
void AstNumberingVisitor::VisitTryFinallyStatement(TryFinallyStatement* node) {
IncrementNodeCount();
DisableOptimization(kTryFinallyStatement);
DisableCrankshaft(kTryFinallyStatement);
Visit(node->try_block());
Visit(node->finally_block());
}
......
......@@ -698,12 +698,7 @@ TEST(BailoutReason) {
" debugger;\n"
" startProfiling();\n"
"}\n"
"function TryFinally() {\n"
" try {\n"
" Debugger();\n"
" } finally { };\n"
"}\n"
"TryFinally();\n"
"Debugger();\n"
"stopProfiling();"));
script->Run(v8::Isolate::GetCurrent()->GetCurrentContext()).ToLocalChecked();
CHECK_EQ(1, iprofiler->GetProfilesCount());
......@@ -715,15 +710,10 @@ TEST(BailoutReason) {
// The tree should look like this:
// (root)
// ""
// kTryFinallyStatement
// kDebuggerStatement
current = PickChild(current, "");
CHECK(const_cast<v8::CpuProfileNode*>(current));
current = PickChild(current, "TryFinally");
CHECK(const_cast<v8::CpuProfileNode*>(current));
CHECK(!strcmp("TryFinallyStatement", current->GetBailoutReason()));
current = PickChild(current, "Debugger");
CHECK(const_cast<v8::CpuProfileNode*>(current));
CHECK(!strcmp("DebuggerStatement", current->GetBailoutReason()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment