| 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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 | 781 |
| 782 // Check if this class represents the 'void' class. | 782 // Check if this class represents the 'void' class. |
| 783 bool IsVoidClass() const { return id() == kVoidCid; } | 783 bool IsVoidClass() const { return id() == kVoidCid; } |
| 784 | 784 |
| 785 // Check if this class represents the 'Object' class. | 785 // Check if this class represents the 'Object' class. |
| 786 bool IsObjectClass() const { return id() == kInstanceCid; } | 786 bool IsObjectClass() const { return id() == kInstanceCid; } |
| 787 | 787 |
| 788 // Check if this class represents the 'Function' class. | 788 // Check if this class represents the 'Function' class. |
| 789 bool IsFunctionClass() const; | 789 bool IsFunctionClass() const; |
| 790 | 790 |
| 791 // Check if this class represents the 'List' class. | |
| 792 bool IsListClass() const; | |
| 793 | |
| 794 // Check if this class represents a signature class. | 791 // Check if this class represents a signature class. |
| 795 bool IsSignatureClass() const { | 792 bool IsSignatureClass() const { |
| 796 return signature_function() != Object::null(); | 793 return signature_function() != Object::null(); |
| 797 } | 794 } |
| 798 static bool IsSignatureClass(RawClass* cls) { | 795 static bool IsSignatureClass(RawClass* cls) { |
| 799 return cls->ptr()->signature_function_ != Object::null(); | 796 return cls->ptr()->signature_function_ != Object::null(); |
| 800 } | 797 } |
| 801 | 798 |
| 802 // Check if this class represents a canonical signature class, i.e. not an | 799 // Check if this class represents a canonical signature class, i.e. not an |
| 803 // alias as defined in a typedef. | 800 // alias as defined in a typedef. |
| (...skipping 5194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5998 | 5995 |
| 5999 | 5996 |
| 6000 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 5997 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6001 intptr_t index) { | 5998 intptr_t index) { |
| 6002 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 5999 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6003 } | 6000 } |
| 6004 | 6001 |
| 6005 } // namespace dart | 6002 } // namespace dart |
| 6006 | 6003 |
| 6007 #endif // VM_OBJECT_H_ | 6004 #endif // VM_OBJECT_H_ |
| OLD | NEW |