Commit 43547df9 authored by jkummerow's avatar jkummerow Committed by Commit bot

[crankshaft] Don't inline "dont_crankshaft" functions

Crankshaft shouldn't try to inline functions it knows it can't handle.

BUG=v8:5033

Review-Url: https://codereview.chromium.org/2000703002
Cr-Commit-Position: refs/heads/master@{#36417}
parent 766d3ea9
......@@ -8564,6 +8564,10 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
TraceInline(target, caller, "parse failure");
return false;
}
if (target_shared->dont_crankshaft()) {
TraceInline(target, caller, "ParseAndAnalyze found incompatibility");
return false;
}
if (target_info.scope()->num_heap_slots() > 0) {
TraceInline(target, caller, "target has context-allocated variables");
......
// 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
var test = function() {
var t = Date.now(); // Just any non-constant double value.
var o = {
['p']: 1,
t
};
};
function caller() {
test();
}
caller();
caller();
%OptimizeFunctionOnNextCall(caller);
caller();
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