| OLD | NEW | 
|    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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  236 } |  236 } | 
|  237  |  237  | 
|  238  |  238  | 
|  239 Reduction JSInliner::Reduce(Node* node) { |  239 Reduction JSInliner::Reduce(Node* node) { | 
|  240   if (node->opcode() != IrOpcode::kJSCallFunction) return NoChange(); |  240   if (node->opcode() != IrOpcode::kJSCallFunction) return NoChange(); | 
|  241  |  241  | 
|  242   JSCallFunctionAccessor call(node); |  242   JSCallFunctionAccessor call(node); | 
|  243   HeapObjectMatcher match(call.jsfunction()); |  243   HeapObjectMatcher match(call.jsfunction()); | 
|  244   if (!match.HasValue()) return NoChange(); |  244   if (!match.HasValue()) return NoChange(); | 
|  245  |  245  | 
|  246   if (!match.Value().handle()->IsJSFunction()) return NoChange(); |  246   if (!match.Value()->IsJSFunction()) return NoChange(); | 
|  247   Handle<JSFunction> function = |  247   Handle<JSFunction> function = Handle<JSFunction>::cast(match.Value()); | 
|  248       Handle<JSFunction>::cast(match.Value().handle()); |  | 
|  249   if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) { |  248   if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) { | 
|  250     return NoChange(); |  249     return NoChange(); | 
|  251   } |  250   } | 
|  252  |  251  | 
|  253   if (function->shared()->HasDebugInfo()) { |  252   if (function->shared()->HasDebugInfo()) { | 
|  254     // Function contains break points. |  253     // Function contains break points. | 
|  255     TRACE("Not inlining %s into %s because callee may contain break points\n", |  254     TRACE("Not inlining %s into %s because callee may contain break points\n", | 
|  256           function->shared()->DebugName()->ToCString().get(), |  255           function->shared()->DebugName()->ToCString().get(), | 
|  257           info_->shared_info()->DebugName()->ToCString().get()); |  256           info_->shared_info()->DebugName()->ToCString().get()); | 
|  258     return NoChange(); |  257     return NoChange(); | 
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  345  |  344  | 
|  346   // Remember that we inlined this function. |  345   // Remember that we inlined this function. | 
|  347   info_->AddInlinedFunction(info.shared_info()); |  346   info_->AddInlinedFunction(info.shared_info()); | 
|  348  |  347  | 
|  349   return InlineCall(node, context, frame_state, start, end); |  348   return InlineCall(node, context, frame_state, start, end); | 
|  350 } |  349 } | 
|  351  |  350  | 
|  352 }  // namespace compiler |  351 }  // namespace compiler | 
|  353 }  // namespace internal |  352 }  // namespace internal | 
|  354 }  // namespace v8 |  353 }  // namespace v8 | 
| OLD | NEW |