| 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/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
| 6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/generic-node-inl.h" | 7 #include "src/compiler/generic-node-inl.h" |
| 8 #include "src/compiler/graph-inl.h" | 8 #include "src/compiler/graph-inl.h" |
| 9 #include "src/compiler/graph-visualizer.h" | 9 #include "src/compiler/graph-visualizer.h" |
| 10 #include "src/compiler/js-inlining.h" | 10 #include "src/compiler/js-inlining.h" |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 call->RemoveAllInputs(); | 230 call->RemoveAllInputs(); |
| 231 DCHECK_EQ(0, call->UseCount()); | 231 DCHECK_EQ(0, call->UseCount()); |
| 232 // TODO(sigurds) Remove this once we copy. | 232 // TODO(sigurds) Remove this once we copy. |
| 233 unique_return()->RemoveAllInputs(); | 233 unique_return()->RemoveAllInputs(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 | 236 |
| 237 void JSInliner::TryInlineCall(Node* node) { | 237 void JSInliner::TryInlineCall(Node* node) { |
| 238 DCHECK_EQ(IrOpcode::kJSCallFunction, node->opcode()); | 238 DCHECK_EQ(IrOpcode::kJSCallFunction, node->opcode()); |
| 239 | 239 |
| 240 ValueMatcher<Handle<JSFunction> > match(node->InputAt(0)); | 240 HeapObjectMatcher<JSFunction> match(node->InputAt(0)); |
| 241 if (!match.HasValue()) { | 241 if (!match.HasValue()) { |
| 242 return; | 242 return; |
| 243 } | 243 } |
| 244 | 244 |
| 245 Handle<JSFunction> function = match.Value(); | 245 Handle<JSFunction> function = match.Value().handle(); |
| 246 | 246 |
| 247 if (function->shared()->native()) { | 247 if (function->shared()->native()) { |
| 248 if (FLAG_trace_turbo_inlining) { | 248 if (FLAG_trace_turbo_inlining) { |
| 249 SmartArrayPointer<char> name = | 249 SmartArrayPointer<char> name = |
| 250 function->shared()->DebugName()->ToCString(); | 250 function->shared()->DebugName()->ToCString(); |
| 251 PrintF("Not Inlining %s into %s because inlinee is native\n", name.get(), | 251 PrintF("Not Inlining %s into %s because inlinee is native\n", name.get(), |
| 252 info_->shared_info()->DebugName()->ToCString().get()); | 252 info_->shared_info()->DebugName()->ToCString().get()); |
| 253 } | 253 } |
| 254 return; | 254 return; |
| 255 } | 255 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 287 |
| 288 Inlinee inlinee(&jsgraph); | 288 Inlinee inlinee(&jsgraph); |
| 289 inlinee.UnifyReturn(); | 289 inlinee.UnifyReturn(); |
| 290 inlinee.InlineAtCall(jsgraph_, node); | 290 inlinee.InlineAtCall(jsgraph_, node); |
| 291 | 291 |
| 292 jsgraph_->graph()->SetNextNodeId(inlinee.graph()->NextNodeID()); | 292 jsgraph_->graph()->SetNextNodeId(inlinee.graph()->NextNodeID()); |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 } // namespace v8::internal::compiler | 296 } // namespace v8::internal::compiler |
| OLD | NEW |