OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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-call-reducer.h" | 5 #include "src/compiler/js-call-reducer.h" |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // Didn't find any appropriate CheckMaps node. | 255 // Didn't find any appropriate CheckMaps node. |
256 return MaybeHandle<Map>(); | 256 return MaybeHandle<Map>(); |
257 } | 257 } |
258 dominator = NodeProperties::GetEffectInput(dominator); | 258 dominator = NodeProperties::GetEffectInput(dominator); |
259 } | 259 } |
260 } | 260 } |
261 | 261 |
262 bool CanInlineApiCall(Isolate* isolate, Node* node, | 262 bool CanInlineApiCall(Isolate* isolate, Node* node, |
263 Handle<FunctionTemplateInfo> function_template_info) { | 263 Handle<FunctionTemplateInfo> function_template_info) { |
264 DCHECK(node->opcode() == IrOpcode::kJSCallFunction); | 264 DCHECK(node->opcode() == IrOpcode::kJSCallFunction); |
| 265 if (V8_UNLIKELY(FLAG_runtime_stats)) return false; |
265 if (function_template_info->call_code()->IsUndefined(isolate)) { | 266 if (function_template_info->call_code()->IsUndefined(isolate)) { |
266 return false; | 267 return false; |
267 } | 268 } |
268 CallFunctionParameters const& params = CallFunctionParametersOf(node->op()); | 269 CallFunctionParameters const& params = CallFunctionParametersOf(node->op()); |
269 // CallApiCallbackStub expects the target in a register, so we count it out, | 270 // CallApiCallbackStub expects the target in a register, so we count it out, |
270 // and counts the receiver as an implicit argument, so we count the receiver | 271 // and counts the receiver as an implicit argument, so we count the receiver |
271 // out too. | 272 // out too. |
272 int const argc = static_cast<int>(params.arity()) - 2; | 273 int const argc = static_cast<int>(params.arity()) - 2; |
273 if (argc > CallApiCallbackStub::kArgMax || !params.feedback().IsValid()) { | 274 if (argc > CallApiCallbackStub::kArgMax || !params.feedback().IsValid()) { |
274 return false; | 275 return false; |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 return jsgraph()->javascript(); | 669 return jsgraph()->javascript(); |
669 } | 670 } |
670 | 671 |
671 SimplifiedOperatorBuilder* JSCallReducer::simplified() const { | 672 SimplifiedOperatorBuilder* JSCallReducer::simplified() const { |
672 return jsgraph()->simplified(); | 673 return jsgraph()->simplified(); |
673 } | 674 } |
674 | 675 |
675 } // namespace compiler | 676 } // namespace compiler |
676 } // namespace internal | 677 } // namespace internal |
677 } // namespace v8 | 678 } // namespace v8 |
OLD | NEW |