Chromium Code Reviews

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

Issue 1233073005: Debugger: prepare code for debugging on a per-function basis. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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/all-nodes.h" 9 #include "src/compiler/all-nodes.h"
10 #include "src/compiler/ast-graph-builder.h" 10 #include "src/compiler/ast-graph-builder.h"
(...skipping 231 matching lines...)
242 HeapObjectMatcher match(call.jsfunction()); 242 HeapObjectMatcher match(call.jsfunction());
243 if (!match.HasValue()) return NoChange(); 243 if (!match.HasValue()) return NoChange();
244 244
245 if (!match.Value().handle()->IsJSFunction()) return NoChange(); 245 if (!match.Value().handle()->IsJSFunction()) return NoChange();
246 Handle<JSFunction> function = 246 Handle<JSFunction> function =
247 Handle<JSFunction>::cast(match.Value().handle()); 247 Handle<JSFunction>::cast(match.Value().handle());
248 if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) { 248 if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) {
249 return NoChange(); 249 return NoChange();
250 } 250 }
251 251
252 if (function->shared()->HasDebugInfo()) {
253 // Function contains break points.
254 return NoChange();
Michael Starzinger 2015/07/20 11:29:40 Please add a tracing line ... TRACE("Not inlining
Yang 2015/07/20 12:13:47 Done.
255 }
256
252 // Disallow cross native-context inlining for now. This means that all parts 257 // Disallow cross native-context inlining for now. This means that all parts
253 // of the resulting code will operate on the same global object. 258 // of the resulting code will operate on the same global object.
254 // This also prevents cross context leaks for asm.js code, where we could 259 // This also prevents cross context leaks for asm.js code, where we could
255 // inline functions from a different context and hold on to that context (and 260 // inline functions from a different context and hold on to that context (and
256 // closure) from the code object. 261 // closure) from the code object.
257 // TODO(turbofan): We might want to revisit this restriction later when we 262 // TODO(turbofan): We might want to revisit this restriction later when we
258 // have a need for this, and we know how to model different native contexts 263 // have a need for this, and we know how to model different native contexts
259 // in the same graph in a compositional way. 264 // in the same graph in a compositional way.
260 if (function->context()->native_context() != 265 if (function->context()->native_context() !=
261 info_->context()->native_context()) { 266 info_->context()->native_context()) {
(...skipping 74 matching lines...)
336 341
337 // Remember that we inlined this function. 342 // Remember that we inlined this function.
338 info_->AddInlinedFunction(info.shared_info()); 343 info_->AddInlinedFunction(info.shared_info());
339 344
340 return InlineCall(node, context, frame_state, start, end); 345 return InlineCall(node, context, frame_state, start, end);
341 } 346 }
342 347
343 } // namespace compiler 348 } // namespace compiler
344 } // namespace internal 349 } // namespace internal
345 } // namespace v8 350 } // namespace v8
OLDNEW

Powered by Google App Engine