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/jit_optimizer.h" | 5 #include "vm/jit_optimizer.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/branch_optimizer.h" | 8 #include "vm/branch_optimizer.h" |
9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2384 | 2384 |
2385 // Private classes cannot be subclassed by later loaded libs. | 2385 // Private classes cannot be subclassed by later loaded libs. |
2386 if (!type_class.IsPrivate()) { | 2386 if (!type_class.IsPrivate()) { |
2387 if (FLAG_use_cha_deopt || isolate()->all_classes_finalized()) { | 2387 if (FLAG_use_cha_deopt || isolate()->all_classes_finalized()) { |
2388 if (FLAG_trace_cha) { | 2388 if (FLAG_trace_cha) { |
2389 THR_Print(" **(CHA) Typecheck as class equality since no " | 2389 THR_Print(" **(CHA) Typecheck as class equality since no " |
2390 "subclasses: %s\n", | 2390 "subclasses: %s\n", |
2391 type_class.ToCString()); | 2391 type_class.ToCString()); |
2392 } | 2392 } |
2393 if (FLAG_use_cha_deopt) { | 2393 if (FLAG_use_cha_deopt) { |
2394 thread()->cha()->AddToLeafClasses(type_class); | 2394 thread()->cha()->AddToGuardedClasses(type_class, /*subclass_count=*/0); |
2395 } | 2395 } |
2396 } else { | 2396 } else { |
2397 return false; | 2397 return false; |
2398 } | 2398 } |
2399 } | 2399 } |
2400 const intptr_t num_type_args = type_class.NumTypeArguments(); | 2400 const intptr_t num_type_args = type_class.NumTypeArguments(); |
2401 if (num_type_args > 0) { | 2401 if (num_type_args > 0) { |
2402 // Only raw types can be directly compared, thus disregarding type | 2402 // Only raw types can be directly compared, thus disregarding type |
2403 // arguments. | 2403 // arguments. |
2404 const intptr_t num_type_params = type_class.NumTypeParameters(); | 2404 const intptr_t num_type_params = type_class.NumTypeParameters(); |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3081 | 3081 |
3082 // Discard the environment from the original instruction because the store | 3082 // Discard the environment from the original instruction because the store |
3083 // can't deoptimize. | 3083 // can't deoptimize. |
3084 instr->RemoveEnvironment(); | 3084 instr->RemoveEnvironment(); |
3085 ReplaceCall(instr, store); | 3085 ReplaceCall(instr, store); |
3086 return true; | 3086 return true; |
3087 } | 3087 } |
3088 | 3088 |
3089 | 3089 |
3090 } // namespace dart | 3090 } // namespace dart |
OLD | NEW |