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 "platform/assert.h" | 5 #include "platform/assert.h" |
6 #include "vm/cha.h" | 6 #include "vm/cha.h" |
7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #include "vm/symbols.h" | 9 #include "vm/symbols.h" |
10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 EXPECT(!CHA::HasSubclasses(class_c)); | 91 EXPECT(!CHA::HasSubclasses(class_c)); |
92 cha.AddToLeafClasses(class_c); | 92 cha.AddToLeafClasses(class_c); |
93 EXPECT(!CHA::HasSubclasses(class_d)); | 93 EXPECT(!CHA::HasSubclasses(class_d)); |
94 cha.AddToLeafClasses(class_d); | 94 cha.AddToLeafClasses(class_d); |
95 | 95 |
96 EXPECT(!ContainsCid(cha.leaf_classes(), class_a.id())); | 96 EXPECT(!ContainsCid(cha.leaf_classes(), class_a.id())); |
97 EXPECT(!ContainsCid(cha.leaf_classes(), class_b.id())); | 97 EXPECT(!ContainsCid(cha.leaf_classes(), class_b.id())); |
98 EXPECT(ContainsCid(cha.leaf_classes(), class_c.id())); | 98 EXPECT(ContainsCid(cha.leaf_classes(), class_c.id())); |
99 EXPECT(ContainsCid(cha.leaf_classes(), class_d.id())); | 99 EXPECT(ContainsCid(cha.leaf_classes(), class_d.id())); |
100 | 100 |
101 const Class& function_impl_class = | 101 const Class& closure_class = |
102 Class::Handle(Type::Handle(Isolate::Current()->object_store()-> | 102 Class::Handle(Isolate::Current()->object_store()->closure_class()); |
103 function_impl_type()).type_class()); | 103 EXPECT(!cha.HasSubclasses(closure_class.id())); |
104 EXPECT(cha.HasSubclasses(function_impl_class.id())); | |
105 } | 104 } |
106 | 105 |
107 } // namespace dart | 106 } // namespace dart |
OLD | NEW |