| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 StubCode::ThreeArgsOptimizedCheckInlineCacheEntryPoint(); | 526 StubCode::ThreeArgsOptimizedCheckInlineCacheEntryPoint(); |
| 527 break; | 527 break; |
| 528 default: | 528 default: |
| 529 UNIMPLEMENTED(); | 529 UNIMPLEMENTED(); |
| 530 } | 530 } |
| 531 ExternalLabel target_label("InlineCache", label_address); | 531 ExternalLabel target_label("InlineCache", label_address); |
| 532 EmitOptimizedInstanceCall(&target_label, ic_data, arguments_descriptor, | 532 EmitOptimizedInstanceCall(&target_label, ic_data, arguments_descriptor, |
| 533 argument_count, deopt_id, token_pos, locs); | 533 argument_count, deopt_id, token_pos, locs); |
| 534 return; | 534 return; |
| 535 } | 535 } |
| 536 |
| 536 if (is_optimizing()) { | 537 if (is_optimizing()) { |
| 537 // Megamorphic call requires one argument ICData. | 538 EmitMegamorphicInstanceCall(ic_data, arguments_descriptor, argument_count, |
| 538 ASSERT(ic_data.num_args_tested() == 1); | 539 deopt_id, token_pos, locs); |
| 539 label_address = StubCode::MegamorphicCallEntryPoint(); | 540 return; |
| 540 } else { | 541 } |
| 541 switch (ic_data.num_args_tested()) { | 542 |
| 542 case 1: | 543 switch (ic_data.num_args_tested()) { |
| 543 label_address = StubCode::OneArgCheckInlineCacheEntryPoint(); | 544 case 1: |
| 544 break; | 545 label_address = StubCode::OneArgCheckInlineCacheEntryPoint(); |
| 545 case 2: | 546 break; |
| 546 label_address = StubCode::TwoArgsCheckInlineCacheEntryPoint(); | 547 case 2: |
| 547 break; | 548 label_address = StubCode::TwoArgsCheckInlineCacheEntryPoint(); |
| 548 case 3: | 549 break; |
| 549 label_address = StubCode::ThreeArgsCheckInlineCacheEntryPoint(); | 550 case 3: |
| 550 break; | 551 label_address = StubCode::ThreeArgsCheckInlineCacheEntryPoint(); |
| 551 default: | 552 break; |
| 552 UNIMPLEMENTED(); | 553 default: |
| 553 } | 554 UNIMPLEMENTED(); |
| 554 } | 555 } |
| 555 ExternalLabel target_label("InlineCache", label_address); | 556 ExternalLabel target_label("InlineCache", label_address); |
| 556 EmitInstanceCall(&target_label, ic_data, arguments_descriptor, argument_count, | 557 EmitInstanceCall(&target_label, ic_data, arguments_descriptor, argument_count, |
| 557 deopt_id, token_pos, locs); | 558 deopt_id, token_pos, locs); |
| 558 } | 559 } |
| 559 | 560 |
| 560 | 561 |
| 561 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id, | 562 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id, |
| 562 intptr_t token_pos, | 563 intptr_t token_pos, |
| 563 const Function& function, | 564 const Function& function, |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1024 const AbstractTypeArguments& type_arguments = | 1025 const AbstractTypeArguments& type_arguments = |
| 1025 AbstractTypeArguments::Handle(type.arguments()); | 1026 AbstractTypeArguments::Handle(type.arguments()); |
| 1026 const bool is_raw_type = type_arguments.IsNull() || | 1027 const bool is_raw_type = type_arguments.IsNull() || |
| 1027 type_arguments.IsRaw(type_arguments.Length()); | 1028 type_arguments.IsRaw(type_arguments.Length()); |
| 1028 return is_raw_type; | 1029 return is_raw_type; |
| 1029 } | 1030 } |
| 1030 return true; | 1031 return true; |
| 1031 } | 1032 } |
| 1032 | 1033 |
| 1033 } // namespace dart | 1034 } // namespace dart |
| OLD | NEW |