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/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/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/cha.h" | 10 #include "vm/cha.h" |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 865 intptr_t deopt_id, | 865 intptr_t deopt_id, |
| 866 intptr_t token_pos, | 866 intptr_t token_pos, |
| 867 intptr_t argument_count, | 867 intptr_t argument_count, |
| 868 LocationSummary* locs, | 868 LocationSummary* locs, |
| 869 const ICData& ic_data) { | 869 const ICData& ic_data) { |
| 870 ASSERT(!ic_data.IsNull()); | 870 ASSERT(!ic_data.IsNull()); |
| 871 ASSERT(FLAG_propagate_ic_data || (ic_data.NumberOfUsedChecks() == 0)); | 871 ASSERT(FLAG_propagate_ic_data || (ic_data.NumberOfUsedChecks() == 0)); |
| 872 uword label_address = 0; | 872 uword label_address = 0; |
| 873 StubCode* stub_code = isolate()->stub_code(); | 873 StubCode* stub_code = isolate()->stub_code(); |
| 874 if (is_optimizing() && (ic_data.NumberOfUsedChecks() == 0)) { | 874 if (is_optimizing() && (ic_data.NumberOfUsedChecks() == 0)) { |
| 875 if (ic_data.IsClosureCall()) { | |
|
Florian Schneider
2014/09/08 16:17:17
This code has effectively become unreachable, beca
| |
| 876 // This IC call may be closure call only. | |
| 877 label_address = stub_code->ClosureCallInlineCacheEntryPoint(); | |
| 878 ExternalLabel target_label(label_address); | |
| 879 EmitInstanceCall(&target_label, | |
| 880 ICData::ZoneHandle(ic_data.AsUnaryClassChecks()), | |
| 881 argument_count, deopt_id, token_pos, locs); | |
| 882 return; | |
| 883 } | |
| 884 // Emit IC call that will count and thus may need reoptimization at | 875 // Emit IC call that will count and thus may need reoptimization at |
| 885 // function entry. | 876 // function entry. |
| 886 ASSERT(!is_optimizing() | 877 ASSERT(!is_optimizing() |
| 887 || may_reoptimize() | 878 || may_reoptimize() |
| 888 || flow_graph().IsCompiledForOsr()); | 879 || flow_graph().IsCompiledForOsr()); |
| 889 switch (ic_data.NumArgsTested()) { | 880 switch (ic_data.NumArgsTested()) { |
| 890 case 1: | 881 case 1: |
| 891 label_address = stub_code->OneArgOptimizedCheckInlineCacheEntryPoint(); | 882 label_address = stub_code->OneArgOptimizedCheckInlineCacheEntryPoint(); |
| 892 break; | 883 break; |
| 893 case 2: | 884 case 2: |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1464 threshold = FLAG_optimization_counter_scale * basic_blocks + | 1455 threshold = FLAG_optimization_counter_scale * basic_blocks + |
| 1465 FLAG_min_optimization_counter_threshold; | 1456 FLAG_min_optimization_counter_threshold; |
| 1466 if (threshold > FLAG_optimization_counter_threshold) { | 1457 if (threshold > FLAG_optimization_counter_threshold) { |
| 1467 threshold = FLAG_optimization_counter_threshold; | 1458 threshold = FLAG_optimization_counter_threshold; |
| 1468 } | 1459 } |
| 1469 } | 1460 } |
| 1470 return threshold; | 1461 return threshold; |
| 1471 } | 1462 } |
| 1472 | 1463 |
| 1473 } // namespace dart | 1464 } // namespace dart |
| OLD | NEW |