| 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/bigint_operations.h" | 7 #include "vm/bigint_operations.h" | 
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" | 
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" | 
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" | 
| (...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2305 | 2305 | 
| 2306 void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2306 void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 
| 2307   const ICData* call_ic_data = NULL; | 2307   const ICData* call_ic_data = NULL; | 
| 2308   if (!FLAG_propagate_ic_data || !compiler->is_optimizing()) { | 2308   if (!FLAG_propagate_ic_data || !compiler->is_optimizing()) { | 
| 2309     const Array& arguments_descriptor = | 2309     const Array& arguments_descriptor = | 
| 2310         Array::Handle(ArgumentsDescriptor::New(ArgumentCount(), | 2310         Array::Handle(ArgumentsDescriptor::New(ArgumentCount(), | 
| 2311                                                argument_names())); | 2311                                                argument_names())); | 
| 2312     MethodRecognizer::Kind recognized_kind = | 2312     MethodRecognizer::Kind recognized_kind = | 
| 2313         MethodRecognizer::RecognizeKind(function()); | 2313         MethodRecognizer::RecognizeKind(function()); | 
| 2314     int num_args_checked = 0; | 2314     int num_args_checked = 0; | 
| 2315     if ((recognized_kind == MethodRecognizer::kMathMin) || | 2315     switch (recognized_kind) { | 
| 2316         (recognized_kind == MethodRecognizer::kMathMax)) { | 2316       case MethodRecognizer::kDoubleFromInteger: | 
| 2317       num_args_checked = 2; | 2317         num_args_checked = 1; | 
|  | 2318         break; | 
|  | 2319       case MethodRecognizer::kMathMin: | 
|  | 2320       case MethodRecognizer::kMathMax: | 
|  | 2321         num_args_checked = 2; | 
|  | 2322         break; | 
|  | 2323       default: | 
|  | 2324         break; | 
| 2318     } | 2325     } | 
| 2319     call_ic_data = compiler->GetOrAddStaticCallICData(deopt_id(), | 2326     call_ic_data = compiler->GetOrAddStaticCallICData(deopt_id(), | 
| 2320                                                       function(), | 2327                                                       function(), | 
| 2321                                                       arguments_descriptor, | 2328                                                       arguments_descriptor, | 
| 2322                                                       num_args_checked); | 2329                                                       num_args_checked); | 
| 2323   } else { | 2330   } else { | 
| 2324     call_ic_data = &ICData::ZoneHandle(ic_data()->raw()); | 2331     call_ic_data = &ICData::ZoneHandle(ic_data()->raw()); | 
| 2325   } | 2332   } | 
| 2326   if (!compiler->is_optimizing()) { | 2333   if (!compiler->is_optimizing()) { | 
| 2327     // Some static calls can be optimized by the optimizing compiler (e.g. sqrt) | 2334     // Some static calls can be optimized by the optimizing compiler (e.g. sqrt) | 
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2802     case Token::kTRUNCDIV: return 0; | 2809     case Token::kTRUNCDIV: return 0; | 
| 2803     case Token::kMOD: return 1; | 2810     case Token::kMOD: return 1; | 
| 2804     default: UNIMPLEMENTED(); return -1; | 2811     default: UNIMPLEMENTED(); return -1; | 
| 2805   } | 2812   } | 
| 2806 } | 2813 } | 
| 2807 | 2814 | 
| 2808 | 2815 | 
| 2809 #undef __ | 2816 #undef __ | 
| 2810 | 2817 | 
| 2811 }  // namespace dart | 2818 }  // namespace dart | 
| OLD | NEW | 
|---|