| 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 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3087 | 3087 |
| 3088 // Check if this type represents the 'int' type. | 3088 // Check if this type represents the 'int' type. |
| 3089 bool IsIntType() const; | 3089 bool IsIntType() const; |
| 3090 | 3090 |
| 3091 // Check if this type represents the 'double' type. | 3091 // Check if this type represents the 'double' type. |
| 3092 bool IsDoubleType() const; | 3092 bool IsDoubleType() const; |
| 3093 | 3093 |
| 3094 // Check if this type represents the 'num' type. | 3094 // Check if this type represents the 'num' type. |
| 3095 bool IsNumberType() const; | 3095 bool IsNumberType() const; |
| 3096 | 3096 |
| 3097 // Check if this type represents the 'String' interface. | 3097 // Check if this type represents the 'String' type. |
| 3098 bool IsStringInterface() const; | 3098 bool IsStringType() const; |
| 3099 | 3099 |
| 3100 // Check if this type represents the 'Function' type. | 3100 // Check if this type represents the 'Function' type. |
| 3101 bool IsFunctionType() const; | 3101 bool IsFunctionType() const; |
| 3102 | 3102 |
| 3103 // Check if this type represents the 'List' interface. | 3103 // Check if this type represents the 'List' type. |
| 3104 bool IsListInterface() const; | 3104 bool IsListType() const; |
| 3105 | 3105 |
| 3106 // Check if this type is an interface type. | 3106 // Check if this type is an interface type. |
| 3107 bool IsInterfaceType() const { | 3107 bool IsInterfaceType() const { |
| 3108 if (!HasResolvedTypeClass()) { | 3108 if (!HasResolvedTypeClass()) { |
| 3109 return false; | 3109 return false; |
| 3110 } | 3110 } |
| 3111 const Class& cls = Class::Handle(type_class()); | 3111 const Class& cls = Class::Handle(type_class()); |
| 3112 return !cls.IsNull() && cls.is_interface(); | 3112 return !cls.IsNull() && cls.is_interface(); |
| 3113 } | 3113 } |
| 3114 | 3114 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3211 | 3211 |
| 3212 // The 'Mint' type. | 3212 // The 'Mint' type. |
| 3213 static RawType* MintType(); | 3213 static RawType* MintType(); |
| 3214 | 3214 |
| 3215 // The 'double' type. | 3215 // The 'double' type. |
| 3216 static RawType* Double(); | 3216 static RawType* Double(); |
| 3217 | 3217 |
| 3218 // The 'num' interface type. | 3218 // The 'num' interface type. |
| 3219 static RawType* Number(); | 3219 static RawType* Number(); |
| 3220 | 3220 |
| 3221 // The 'String' interface type. | 3221 // The 'String' type. |
| 3222 static RawType* StringInterface(); | 3222 static RawType* StringType(); |
| 3223 | 3223 |
| 3224 // The 'Function' interface type. | 3224 // The 'Function' interface type. |
| 3225 static RawType* Function(); | 3225 static RawType* Function(); |
| 3226 | 3226 |
| 3227 // The 'List' interface type. | 3227 // The 'List' type. |
| 3228 static RawType* ListInterface(); | 3228 static RawType* ListType(); |
| 3229 | 3229 |
| 3230 // The finalized type of the given non-parameterized class. | 3230 // The finalized type of the given non-parameterized class. |
| 3231 static RawType* NewNonParameterizedType(const Class& type_class); | 3231 static RawType* NewNonParameterizedType(const Class& type_class); |
| 3232 | 3232 |
| 3233 static RawType* New(const Object& clazz, | 3233 static RawType* New(const Object& clazz, |
| 3234 const AbstractTypeArguments& arguments, | 3234 const AbstractTypeArguments& arguments, |
| 3235 intptr_t token_pos, | 3235 intptr_t token_pos, |
| 3236 Heap::Space space = Heap::kOld); | 3236 Heap::Space space = Heap::kOld); |
| 3237 | 3237 |
| 3238 private: | 3238 private: |
| (...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5720 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5720 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5721 return false; | 5721 return false; |
| 5722 } | 5722 } |
| 5723 } | 5723 } |
| 5724 return true; | 5724 return true; |
| 5725 } | 5725 } |
| 5726 | 5726 |
| 5727 } // namespace dart | 5727 } // namespace dart |
| 5728 | 5728 |
| 5729 #endif // VM_OBJECT_H_ | 5729 #endif // VM_OBJECT_H_ |
| OLD | NEW |