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 RUNTIME_VM_OBJECT_H_ | 5 #ifndef RUNTIME_VM_OBJECT_H_ |
6 #define RUNTIME_VM_OBJECT_H_ | 6 #define RUNTIME_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 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 RawFunction* LookupStaticFunction(const String& name) const; | 1155 RawFunction* LookupStaticFunction(const String& name) const; |
1156 RawFunction* LookupStaticFunctionAllowPrivate(const String& name) const; | 1156 RawFunction* LookupStaticFunctionAllowPrivate(const String& name) const; |
1157 RawFunction* LookupConstructor(const String& name) const; | 1157 RawFunction* LookupConstructor(const String& name) const; |
1158 RawFunction* LookupConstructorAllowPrivate(const String& name) const; | 1158 RawFunction* LookupConstructorAllowPrivate(const String& name) const; |
1159 RawFunction* LookupFactory(const String& name) const; | 1159 RawFunction* LookupFactory(const String& name) const; |
1160 RawFunction* LookupFactoryAllowPrivate(const String& name) const; | 1160 RawFunction* LookupFactoryAllowPrivate(const String& name) const; |
1161 RawFunction* LookupFunction(const String& name) const; | 1161 RawFunction* LookupFunction(const String& name) const; |
1162 RawFunction* LookupFunctionAllowPrivate(const String& name) const; | 1162 RawFunction* LookupFunctionAllowPrivate(const String& name) const; |
1163 RawFunction* LookupGetterFunction(const String& name) const; | 1163 RawFunction* LookupGetterFunction(const String& name) const; |
1164 RawFunction* LookupSetterFunction(const String& name) const; | 1164 RawFunction* LookupSetterFunction(const String& name) const; |
| 1165 RawFunction* LookupCallFunctionForTypeTest() const; |
1165 RawField* LookupInstanceField(const String& name) const; | 1166 RawField* LookupInstanceField(const String& name) const; |
1166 RawField* LookupStaticField(const String& name) const; | 1167 RawField* LookupStaticField(const String& name) const; |
1167 RawField* LookupField(const String& name) const; | 1168 RawField* LookupField(const String& name) const; |
1168 RawField* LookupFieldAllowPrivate(const String& name, | 1169 RawField* LookupFieldAllowPrivate(const String& name, |
1169 bool instance_only = false) const; | 1170 bool instance_only = false) const; |
1170 RawField* LookupInstanceFieldAllowPrivate(const String& name) const; | 1171 RawField* LookupInstanceFieldAllowPrivate(const String& name) const; |
1171 RawField* LookupStaticFieldAllowPrivate(const String& name) const; | 1172 RawField* LookupStaticFieldAllowPrivate(const String& name) const; |
1172 | 1173 |
1173 RawLibraryPrefix* LookupLibraryPrefix(const String& name) const; | 1174 RawLibraryPrefix* LookupLibraryPrefix(const String& name) const; |
1174 | 1175 |
(...skipping 5034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6209 return raw_ptr()->type_parameter_; | 6210 return raw_ptr()->type_parameter_; |
6210 } | 6211 } |
6211 virtual TokenPosition token_pos() const { | 6212 virtual TokenPosition token_pos() const { |
6212 return AbstractType::Handle(type()).token_pos(); | 6213 return AbstractType::Handle(type()).token_pos(); |
6213 } | 6214 } |
6214 virtual bool IsInstantiated(TrailPtr trail = NULL) const { | 6215 virtual bool IsInstantiated(TrailPtr trail = NULL) const { |
6215 // It is not possible to encounter an instantiated bounded type with an | 6216 // It is not possible to encounter an instantiated bounded type with an |
6216 // uninstantiated upper bound. Therefore, we do not need to check if the | 6217 // uninstantiated upper bound. Therefore, we do not need to check if the |
6217 // bound is instantiated. Moreover, doing so could lead into cycles, as in | 6218 // bound is instantiated. Moreover, doing so could lead into cycles, as in |
6218 // class C<T extends C<C>> { }. | 6219 // class C<T extends C<C>> { }. |
6219 return AbstractType::Handle(type()).IsInstantiated(); | 6220 return AbstractType::Handle(type()).IsInstantiated(trail); |
6220 } | 6221 } |
6221 virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const; | 6222 virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const; |
6222 virtual bool IsRecursive() const; | 6223 virtual bool IsRecursive() const; |
6223 virtual RawAbstractType* InstantiateFrom( | 6224 virtual RawAbstractType* InstantiateFrom( |
6224 const TypeArguments& instantiator_type_arguments, | 6225 const TypeArguments& instantiator_type_arguments, |
6225 Error* bound_error, | 6226 Error* bound_error, |
6226 TrailPtr instantiation_trail, | 6227 TrailPtr instantiation_trail, |
6227 TrailPtr bound_trail, | 6228 TrailPtr bound_trail, |
6228 Heap::Space space) const; | 6229 Heap::Space space) const; |
6229 virtual RawAbstractType* CloneUnfinalized() const; | 6230 virtual RawAbstractType* CloneUnfinalized() const; |
(...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8933 | 8934 |
8934 inline void TypeArguments::SetHash(intptr_t value) const { | 8935 inline void TypeArguments::SetHash(intptr_t value) const { |
8935 // This is only safe because we create a new Smi, which does not cause | 8936 // This is only safe because we create a new Smi, which does not cause |
8936 // heap allocation. | 8937 // heap allocation. |
8937 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8938 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8938 } | 8939 } |
8939 | 8940 |
8940 } // namespace dart | 8941 } // namespace dart |
8941 | 8942 |
8942 #endif // RUNTIME_VM_OBJECT_H_ | 8943 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |