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/cha.h" | 5 #include "vm/cha.h" |
6 #include "vm/class_table.h" | 6 #include "vm/class_table.h" |
7 #include "vm/flags.h" | 7 #include "vm/flags.h" |
8 #include "vm/freelist.h" | 8 #include "vm/freelist.h" |
9 #include "vm/object.h" | 9 #include "vm/object.h" |
10 #include "vm/raw_object.h" | 10 #include "vm/raw_object.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 | 43 |
44 bool CHA::HasSubclasses(intptr_t cid) const { | 44 bool CHA::HasSubclasses(intptr_t cid) const { |
45 const ClassTable& class_table = *thread_->isolate()->class_table(); | 45 const ClassTable& class_table = *thread_->isolate()->class_table(); |
46 Class& cls = Class::Handle(thread_->zone(), class_table.At(cid)); | 46 Class& cls = Class::Handle(thread_->zone(), class_table.At(cid)); |
47 return HasSubclasses(cls); | 47 return HasSubclasses(cls); |
48 } | 48 } |
49 | 49 |
50 | 50 |
51 bool CHA::IsImplemented(const Class& cls) { | 51 bool CHA::IsImplemented(const Class& cls) { |
52 // Signature classes have different type checking rules. | 52 // Function type aliases have different type checking rules. |
53 ASSERT(!cls.IsSignatureClass()); | 53 ASSERT(!cls.IsTypedefClass()); |
54 // Can't track dependencies for classes on the VM heap since those are | 54 // Can't track dependencies for classes on the VM heap since those are |
55 // read-only. | 55 // read-only. |
56 // TODO(fschneider): Enable tracking of CHA dependent code for VM heap | 56 // TODO(fschneider): Enable tracking of CHA dependent code for VM heap |
57 // classes. | 57 // classes. |
58 if (cls.InVMHeap()) return true; | 58 if (cls.InVMHeap()) return true; |
59 | 59 |
60 return cls.is_implemented(); | 60 return cls.is_implemented(); |
61 } | 61 } |
62 | 62 |
63 | 63 |
(...skipping 26 matching lines...) Expand all Loading... |
90 return true; | 90 return true; |
91 } | 91 } |
92 if (HasOverride(direct_subclass, function_name)) { | 92 if (HasOverride(direct_subclass, function_name)) { |
93 return true; | 93 return true; |
94 } | 94 } |
95 } | 95 } |
96 return false; | 96 return false; |
97 } | 97 } |
98 | 98 |
99 } // namespace dart | 99 } // namespace dart |
OLD | NEW |