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 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 virtual RawString* DictionaryName() const { return name(); } | 1317 virtual RawString* DictionaryName() const { return name(); } |
1318 | 1318 |
1319 // Build a string of the form 'C<T, R>(T, {b: B, c: C}) => R' representing the | 1319 // Build a string of the form 'C<T, R>(T, {b: B, c: C}) => R' representing the |
1320 // internal signature of the given function. In this example, T and R are | 1320 // internal signature of the given function. In this example, T and R are |
1321 // type parameters of class C, the owner of the function. | 1321 // type parameters of class C, the owner of the function. |
1322 RawString* Signature() const { | 1322 RawString* Signature() const { |
1323 const bool instantiate = false; | 1323 const bool instantiate = false; |
1324 return BuildSignature(instantiate, kInternalName, TypeArguments::Handle()); | 1324 return BuildSignature(instantiate, kInternalName, TypeArguments::Handle()); |
1325 } | 1325 } |
1326 | 1326 |
| 1327 // Build a string of the form '(T, {b: B, c: C}) => R' representing the |
| 1328 // user visible signature of the given function. In this example, T and R are |
| 1329 // type parameters of class C, the owner of the function. |
| 1330 // Implicit parameters are hidden, as well as the prefix denoting the |
| 1331 // signature class and its type parameters. |
| 1332 RawString* UserVisibleSignature() const { |
| 1333 const bool instantiate = false; |
| 1334 return BuildSignature( |
| 1335 instantiate, kUserVisibleName, TypeArguments::Handle()); |
| 1336 } |
| 1337 |
1327 // Build a string of the form '(A, {b: B, c: C}) => D' representing the | 1338 // Build a string of the form '(A, {b: B, c: C}) => D' representing the |
1328 // signature of the given function, where all generic types (e.g. '<T, R>' in | 1339 // signature of the given function, where all generic types (e.g. '<T, R>' in |
1329 // 'C<T, R>(T, {b: B, c: C}) => R') are instantiated using the given | 1340 // 'C<T, R>(T, {b: B, c: C}) => R') are instantiated using the given |
1330 // instantiator type argument vector of a C instance (e.g. '<A, D>'). | 1341 // instantiator type argument vector of a C instance (e.g. '<A, D>'). |
1331 RawString* InstantiatedSignatureFrom( | 1342 RawString* InstantiatedSignatureFrom( |
1332 const AbstractTypeArguments& instantiator, | 1343 const AbstractTypeArguments& instantiator, |
1333 NameVisibility name_visibility) const { | 1344 NameVisibility name_visibility) const { |
1334 const bool instantiate = true; | 1345 const bool instantiate = true; |
1335 return BuildSignature(instantiate, name_visibility, instantiator); | 1346 return BuildSignature(instantiate, name_visibility, instantiator); |
1336 } | 1347 } |
(...skipping 4601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5938 | 5949 |
5939 | 5950 |
5940 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 5951 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
5941 intptr_t index) { | 5952 intptr_t index) { |
5942 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 5953 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
5943 } | 5954 } |
5944 | 5955 |
5945 } // namespace dart | 5956 } // namespace dart |
5946 | 5957 |
5947 #endif // VM_OBJECT_H_ | 5958 #endif // VM_OBJECT_H_ |
OLD | NEW |