| 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/class_finalizer.h" | 5 #include "vm/class_finalizer.h" |
| 6 | 6 |
| 7 #include "vm/code_generator.h" | 7 #include "vm/code_generator.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 finalization, &bound_error); | 876 finalization, &bound_error); |
| 877 } | 877 } |
| 878 CheckTypeArgumentBounds(sig_fun_owner, full_arguments, &bound_error); | 878 CheckTypeArgumentBounds(sig_fun_owner, full_arguments, &bound_error); |
| 879 } else { | 879 } else { |
| 880 if (offset > 0) { | 880 if (offset > 0) { |
| 881 FinalizeTypeArguments(type_class, full_arguments, offset, | 881 FinalizeTypeArguments(type_class, full_arguments, offset, |
| 882 finalization, &bound_error); | 882 finalization, &bound_error); |
| 883 } | 883 } |
| 884 CheckTypeArgumentBounds(type_class, full_arguments, &bound_error); | 884 CheckTypeArgumentBounds(type_class, full_arguments, &bound_error); |
| 885 } | 885 } |
| 886 if (full_arguments.IsRaw(num_type_arguments)) { | 886 if (full_arguments.IsRaw(0, num_type_arguments)) { |
| 887 // The parameterized_type is raw. Set its argument vector to null, which | 887 // The parameterized_type is raw. Set its argument vector to null, which |
| 888 // is more efficient in type tests. | 888 // is more efficient in type tests. |
| 889 full_arguments = TypeArguments::null(); | 889 full_arguments = TypeArguments::null(); |
| 890 } else if (finalization >= kCanonicalize) { | 890 } else if (finalization >= kCanonicalize) { |
| 891 // FinalizeTypeArguments can modify 'full_arguments', | 891 // FinalizeTypeArguments can modify 'full_arguments', |
| 892 // canonicalize afterwards. | 892 // canonicalize afterwards. |
| 893 full_arguments ^= full_arguments.Canonicalize(); | 893 full_arguments ^= full_arguments.Canonicalize(); |
| 894 ASSERT(full_arguments.Length() == num_type_arguments); |
| 894 } | 895 } |
| 895 parameterized_type.set_arguments(full_arguments); | 896 parameterized_type.set_arguments(full_arguments); |
| 896 } else { | 897 } else { |
| 897 ASSERT(full_arguments.IsNull()); // Use null vector for raw type. | 898 ASSERT(full_arguments.IsNull()); // Use null vector for raw type. |
| 898 } | 899 } |
| 899 } | 900 } |
| 900 | 901 |
| 901 // Self referencing types may get finalized indirectly. | 902 // Self referencing types may get finalized indirectly. |
| 902 if (!parameterized_type.IsFinalized()) { | 903 if (!parameterized_type.IsFinalized()) { |
| 903 // Mark the type as finalized. | 904 // Mark the type as finalized. |
| (...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2761 expected_name ^= String::New("_offset"); | 2762 expected_name ^= String::New("_offset"); |
| 2762 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 2763 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
| 2763 field ^= fields_array.At(2); | 2764 field ^= fields_array.At(2); |
| 2764 ASSERT(field.Offset() == TypedDataView::length_offset()); | 2765 ASSERT(field.Offset() == TypedDataView::length_offset()); |
| 2765 name ^= field.name(); | 2766 name ^= field.name(); |
| 2766 ASSERT(name.Equals("length")); | 2767 ASSERT(name.Equals("length")); |
| 2767 #endif | 2768 #endif |
| 2768 } | 2769 } |
| 2769 | 2770 |
| 2770 } // namespace dart | 2771 } // namespace dart |
| OLD | NEW |