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 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 // Set the resolved or unresolved factory class of this interface. | 546 // Set the resolved or unresolved factory class of this interface. |
547 void set_factory_class(const Object& value) const; | 547 void set_factory_class(const Object& value) const; |
548 | 548 |
549 // Interfaces is an array of Types. | 549 // Interfaces is an array of Types. |
550 RawArray* interfaces() const { return raw_ptr()->interfaces_; } | 550 RawArray* interfaces() const { return raw_ptr()->interfaces_; } |
551 void set_interfaces(const Array& value) const; | 551 void set_interfaces(const Array& value) const; |
552 static intptr_t interfaces_offset() { | 552 static intptr_t interfaces_offset() { |
553 return OFFSET_OF(RawClass, interfaces_); | 553 return OFFSET_OF(RawClass, interfaces_); |
554 } | 554 } |
555 | 555 |
| 556 // Returns the list of classes having this class as direct superclass. |
| 557 RawGrowableObjectArray* direct_subclasses() const { |
| 558 return raw_ptr()->direct_subclasses_; |
| 559 } |
| 560 void AddDirectSubclass(const Class& subclass) const; |
| 561 // TODO(regis): Implement RemoveDirectSubclass for class unloading support. |
| 562 |
556 // Check if this class represents the class of null. | 563 // Check if this class represents the class of null. |
557 bool IsNullClass() const { return raw() == Object::null_class(); } | 564 bool IsNullClass() const { return raw() == Object::null_class(); } |
558 | 565 |
559 // Check if this class represents the 'Dynamic' class. | 566 // Check if this class represents the 'Dynamic' class. |
560 bool IsDynamicClass() const { return raw() == Object::dynamic_class(); } | 567 bool IsDynamicClass() const { return raw() == Object::dynamic_class(); } |
561 | 568 |
562 // Check if this class represents the 'void' class. | 569 // Check if this class represents the 'void' class. |
563 bool IsVoidClass() const { return raw() == Object::void_class(); } | 570 bool IsVoidClass() const { return raw() == Object::void_class(); } |
564 | 571 |
565 // Check if this class represents the 'Object' class. | 572 // Check if this class represents the 'Object' class. |
(...skipping 4965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5531 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5538 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
5532 return false; | 5539 return false; |
5533 } | 5540 } |
5534 } | 5541 } |
5535 return true; | 5542 return true; |
5536 } | 5543 } |
5537 | 5544 |
5538 } // namespace dart | 5545 } // namespace dart |
5539 | 5546 |
5540 #endif // VM_OBJECT_H_ | 5547 #endif // VM_OBJECT_H_ |
OLD | NEW |