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

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: addressed comments. Created 5 years, 5 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 | « src/compiler.cc ('k') | src/debug.h » ('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/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...) Expand 10 before | Expand all | Expand 10 after
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 TRACE("Not inlining %s into %s because callee may contain break points\n",
255 function->shared()->DebugName()->ToCString().get(),
256 info_->shared_info()->DebugName()->ToCString().get());
257 return NoChange();
258 }
259
252 // Disallow cross native-context inlining for now. This means that all parts 260 // Disallow cross native-context inlining for now. This means that all parts
253 // of the resulting code will operate on the same global object. 261 // 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 262 // 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 263 // inline functions from a different context and hold on to that context (and
256 // closure) from the code object. 264 // closure) from the code object.
257 // TODO(turbofan): We might want to revisit this restriction later when we 265 // 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 266 // have a need for this, and we know how to model different native contexts
259 // in the same graph in a compositional way. 267 // in the same graph in a compositional way.
260 if (function->context()->native_context() != 268 if (function->context()->native_context() !=
261 info_->context()->native_context()) { 269 info_->context()->native_context()) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 344
337 // Remember that we inlined this function. 345 // Remember that we inlined this function.
338 info_->AddInlinedFunction(info.shared_info()); 346 info_->AddInlinedFunction(info.shared_info());
339 347
340 return InlineCall(node, context, frame_state, start, end); 348 return InlineCall(node, context, frame_state, start, end);
341 } 349 }
342 350
343 } // namespace compiler 351 } // namespace compiler
344 } // namespace internal 352 } // namespace internal
345 } // namespace v8 353 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698