Commit a893a5e5 authored by jarin's avatar jarin Committed by Commit bot

Exclude non-optimizable functions from OptimizeFunctionOnNextCall.

BUG=chromium:491481
R=mstarzinger@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28614}
parent ce551f91
......@@ -88,7 +88,8 @@ RUNTIME_FUNCTION(Runtime_OptimizeFunctionOnNextCall) {
// The following assertion was lifted from the DCHECK inside
// JSFunction::MarkForOptimization().
RUNTIME_ASSERT(function->shared()->allows_lazy_compilation() ||
!function->shared()->optimization_disabled());
(function->code()->kind() == Code::FUNCTION &&
!function->shared()->optimization_disabled()));
// If the function is already optimized, just return.
if (function->IsOptimized()) return isolate->heap()->undefined_value();
......
// Copyright 2015 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
try {
%OptimizeFunctionOnNextCall(print);
try {
__f_16();
} catch(e) { print(e); }
try {
__f_10();
} catch(e) {; }
} catch(e) {}
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