Skip to content

Commit 75b37a6

Browse files
fhinkelofrobots
authored andcommitted
deps: cherry-pick 43547df from V8 upstream
Original commit message: [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} Fixes: #6883 PR-URL: #7863 Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]> Reviewed-By: targos - Michaël Zasso <[email protected]> Reviewed-By: ofrobots - Ali Ijaz Sheikh <[email protected]>
1 parent af63871 commit 75b37a6

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

deps/v8/include/v8-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 5
1212
#define V8_MINOR_VERSION 0
1313
#define V8_BUILD_NUMBER 71
14-
#define V8_PATCH_LEVEL 59
14+
#define V8_PATCH_LEVEL 60
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/crankshaft/hydrogen.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8423,6 +8423,10 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
84238423
TraceInline(target, caller, "parse failure");
84248424
return false;
84258425
}
8426+
if (target_shared->dont_crankshaft()) {
8427+
TraceInline(target, caller, "ParseAndAnalyze found incompatibility");
8428+
return false;
8429+
}
84268430

84278431
if (target_info.scope()->num_heap_slots() > 0) {
84288432
TraceInline(target, caller, "target has context-allocated variables");
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2016 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Flags: --allow-natives-syntax
6+
7+
var test = function() {
8+
var t = Date.now(); // Just any non-constant double value.
9+
var o = {
10+
['p']: 1,
11+
t
12+
};
13+
};
14+
15+
function caller() {
16+
test();
17+
}
18+
caller();
19+
caller();
20+
%OptimizeFunctionOnNextCall(caller);
21+
caller();

0 commit comments

Comments
 (0)