Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/cpu.h" | 8 #include "vm/cpu.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_allocator.h" | 10 #include "vm/flow_graph_allocator.h" |
| (...skipping 2611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2622 void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2622 void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2623 const ICData* call_ic_data = NULL; | 2623 const ICData* call_ic_data = NULL; |
| 2624 if (!FLAG_propagate_ic_data || !compiler->is_optimizing()) { | 2624 if (!FLAG_propagate_ic_data || !compiler->is_optimizing()) { |
| 2625 const Array& arguments_descriptor = | 2625 const Array& arguments_descriptor = |
| 2626 Array::Handle(ArgumentsDescriptor::New(ArgumentCount(), | 2626 Array::Handle(ArgumentsDescriptor::New(ArgumentCount(), |
| 2627 argument_names())); | 2627 argument_names())); |
| 2628 MethodRecognizer::Kind recognized_kind = | 2628 MethodRecognizer::Kind recognized_kind = |
| 2629 MethodRecognizer::RecognizeKind(function()); | 2629 MethodRecognizer::RecognizeKind(function()); |
| 2630 int num_args_checked = 0; | 2630 int num_args_checked = 0; |
| 2631 switch (recognized_kind) { | 2631 switch (recognized_kind) { |
| 2632 case MethodRecognizer::kDoubleFromInteger: | |
| 2633 num_args_checked = 1; | |
|
Florian Schneider
2014/09/17 11:15:32
Change this to 2 to make inlining of DoubleFromInt
Cutch
2014/09/18 16:39:49
Done.
| |
| 2634 break; | |
| 2635 case MethodRecognizer::kMathMin: | 2632 case MethodRecognizer::kMathMin: |
| 2636 case MethodRecognizer::kMathMax: | 2633 case MethodRecognizer::kMathMax: |
| 2637 num_args_checked = 2; | 2634 num_args_checked = 2; |
| 2638 break; | 2635 break; |
| 2639 default: | 2636 default: |
| 2640 break; | 2637 break; |
| 2641 } | 2638 } |
| 2642 call_ic_data = compiler->GetOrAddStaticCallICData(deopt_id(), | 2639 call_ic_data = compiler->GetOrAddStaticCallICData(deopt_id(), |
| 2643 function(), | 2640 function(), |
| 2644 arguments_descriptor, | 2641 arguments_descriptor, |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3143 case Token::kTRUNCDIV: return 0; | 3140 case Token::kTRUNCDIV: return 0; |
| 3144 case Token::kMOD: return 1; | 3141 case Token::kMOD: return 1; |
| 3145 default: UNIMPLEMENTED(); return -1; | 3142 default: UNIMPLEMENTED(); return -1; |
| 3146 } | 3143 } |
| 3147 } | 3144 } |
| 3148 | 3145 |
| 3149 | 3146 |
| 3150 #undef __ | 3147 #undef __ |
| 3151 | 3148 |
| 3152 } // namespace dart | 3149 } // namespace dart |
| OLD | NEW |