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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 // Set the resolved or unresolved factory class of this interface. | 548 // Set the resolved or unresolved factory class of this interface. |
549 void set_factory_class(const Object& value) const; | 549 void set_factory_class(const Object& value) const; |
550 | 550 |
551 // Interfaces is an array of Types. | 551 // Interfaces is an array of Types. |
552 RawArray* interfaces() const { return raw_ptr()->interfaces_; } | 552 RawArray* interfaces() const { return raw_ptr()->interfaces_; } |
553 void set_interfaces(const Array& value) const; | 553 void set_interfaces(const Array& value) const; |
554 static intptr_t interfaces_offset() { | 554 static intptr_t interfaces_offset() { |
555 return OFFSET_OF(RawClass, interfaces_); | 555 return OFFSET_OF(RawClass, interfaces_); |
556 } | 556 } |
557 | 557 |
558 RawArray* functions_cache() const { return raw_ptr()->functions_cache_; } | |
559 void set_functions_cache(const Array& value) const; | |
560 | |
561 static intptr_t functions_cache_offset() { | |
562 return OFFSET_OF(RawClass, functions_cache_); | |
563 } | |
564 | |
565 // Check if this class represents the class of null. | 558 // Check if this class represents the class of null. |
566 bool IsNullClass() const { return raw() == Object::null_class(); } | 559 bool IsNullClass() const { return raw() == Object::null_class(); } |
567 | 560 |
568 // Check if this class represents the 'Dynamic' class. | 561 // Check if this class represents the 'Dynamic' class. |
569 bool IsDynamicClass() const { return raw() == Object::dynamic_class(); } | 562 bool IsDynamicClass() const { return raw() == Object::dynamic_class(); } |
570 | 563 |
571 // Check if this class represents the 'void' class. | 564 // Check if this class represents the 'void' class. |
572 bool IsVoidClass() const { return raw() == Object::void_class(); } | 565 bool IsVoidClass() const { return raw() == Object::void_class(); } |
573 | 566 |
574 // Check if this class represents the 'Object' class. | 567 // Check if this class represents the 'Object' class. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 | 674 |
682 RawCode* allocation_stub() const { | 675 RawCode* allocation_stub() const { |
683 return raw_ptr()->allocation_stub_; | 676 return raw_ptr()->allocation_stub_; |
684 } | 677 } |
685 void set_allocation_stub(const Code& value) const; | 678 void set_allocation_stub(const Code& value) const; |
686 | 679 |
687 RawArray* constants() const; | 680 RawArray* constants() const; |
688 | 681 |
689 void Finalize() const; | 682 void Finalize() const; |
690 | 683 |
691 // Initialize the functions cache array. | |
692 void InitFunctionsCache() const; | |
693 | |
694 // Allocate a class used for VM internal objects. | 684 // Allocate a class used for VM internal objects. |
695 template <class FakeObject> static RawClass* New(); | 685 template <class FakeObject> static RawClass* New(); |
696 | 686 |
697 // Allocate instance classes and interfaces. | 687 // Allocate instance classes and interfaces. |
698 static RawClass* New(const String& name, | 688 static RawClass* New(const String& name, |
699 const Script& script, | 689 const Script& script, |
700 intptr_t token_pos); | 690 intptr_t token_pos); |
701 static RawClass* NewInterface(const String& name, | 691 static RawClass* NewInterface(const String& name, |
702 const Script& script, | 692 const Script& script, |
703 intptr_t token_pos); | 693 intptr_t token_pos); |
(...skipping 4758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5462 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5452 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
5463 return false; | 5453 return false; |
5464 } | 5454 } |
5465 } | 5455 } |
5466 return true; | 5456 return true; |
5467 } | 5457 } |
5468 | 5458 |
5469 } // namespace dart | 5459 } // namespace dart |
5470 | 5460 |
5471 #endif // VM_OBJECT_H_ | 5461 #endif // VM_OBJECT_H_ |
OLD | NEW |