Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1214)

Side by Side Diff: src/compiler/js-inlining.cc

Issue 1395453002: [turbofan] Don't try to inline non-inlineable functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-crbug-540593.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/js-inlining.h" 5 #include "src/compiler/js-inlining.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/compiler/all-nodes.h" 10 #include "src/compiler/all-nodes.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 JSCallFunctionAccessor call(node); 247 JSCallFunctionAccessor call(node);
248 HeapObjectMatcher match(call.jsfunction()); 248 HeapObjectMatcher match(call.jsfunction());
249 if (!match.HasValue()) return NoChange(); 249 if (!match.HasValue()) return NoChange();
250 250
251 if (!match.Value()->IsJSFunction()) return NoChange(); 251 if (!match.Value()->IsJSFunction()) return NoChange();
252 Handle<JSFunction> function = Handle<JSFunction>::cast(match.Value()); 252 Handle<JSFunction> function = Handle<JSFunction>::cast(match.Value());
253 if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) { 253 if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) {
254 return NoChange(); 254 return NoChange();
255 } 255 }
256 256
257 if (!function->shared()->IsInlineable()) {
258 // Function must be inlineable.
259 TRACE("Not inlining %s into %s because callee is not inlineable\n",
260 function->shared()->DebugName()->ToCString().get(),
261 info_->shared_info()->DebugName()->ToCString().get());
262 return NoChange();
263 }
264
257 if (function->shared()->HasDebugInfo()) { 265 if (function->shared()->HasDebugInfo()) {
258 // Function contains break points. 266 // Function contains break points.
259 TRACE("Not inlining %s into %s because callee may contain break points\n", 267 TRACE("Not inlining %s into %s because callee may contain break points\n",
260 function->shared()->DebugName()->ToCString().get(), 268 function->shared()->DebugName()->ToCString().get(),
261 info_->shared_info()->DebugName()->ToCString().get()); 269 info_->shared_info()->DebugName()->ToCString().get());
262 return NoChange(); 270 return NoChange();
263 } 271 }
264 272
265 // Disallow cross native-context inlining for now. This means that all parts 273 // Disallow cross native-context inlining for now. This means that all parts
266 // of the resulting code will operate on the same global object. 274 // of the resulting code will operate on the same global object.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 363
356 // Remember that we inlined this function. 364 // Remember that we inlined this function.
357 info_->AddInlinedFunction(info.shared_info()); 365 info_->AddInlinedFunction(info.shared_info());
358 366
359 return InlineCall(node, context, frame_state, start, end); 367 return InlineCall(node, context, frame_state, start, end);
360 } 368 }
361 369
362 } // namespace compiler 370 } // namespace compiler
363 } // namespace internal 371 } // namespace internal
364 } // namespace v8 372 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-crbug-540593.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698