| 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 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 const AbstractTypeArguments& instantiator, | 1409 const AbstractTypeArguments& instantiator, |
| 1410 NameVisibility name_visibility) const { | 1410 NameVisibility name_visibility) const { |
| 1411 const bool instantiate = true; | 1411 const bool instantiate = true; |
| 1412 return BuildSignature(instantiate, name_visibility, instantiator); | 1412 return BuildSignature(instantiate, name_visibility, instantiator); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 // Returns true if the signature of this function is instantiated, i.e. if it | 1415 // Returns true if the signature of this function is instantiated, i.e. if it |
| 1416 // does not involve generic parameter types or generic result type. | 1416 // does not involve generic parameter types or generic result type. |
| 1417 bool HasInstantiatedSignature() const; | 1417 bool HasInstantiatedSignature() const; |
| 1418 | 1418 |
| 1419 // Build a string of the form 'T, {b: B, c: C} representing the user |
| 1420 // visible formal parameters of the function. |
| 1421 RawString* UserVisibleFormalParameters() const; |
| 1422 |
| 1419 RawClass* Owner() const; | 1423 RawClass* Owner() const; |
| 1420 RawClass* origin() const; | 1424 RawClass* origin() const; |
| 1421 RawScript* script() const; | 1425 RawScript* script() const; |
| 1422 | 1426 |
| 1423 RawAbstractType* result_type() const { return raw_ptr()->result_type_; } | 1427 RawAbstractType* result_type() const { return raw_ptr()->result_type_; } |
| 1424 void set_result_type(const AbstractType& value) const; | 1428 void set_result_type(const AbstractType& value) const; |
| 1425 | 1429 |
| 1426 RawAbstractType* ParameterTypeAt(intptr_t index) const; | 1430 RawAbstractType* ParameterTypeAt(intptr_t index) const; |
| 1427 void SetParameterTypeAt(intptr_t index, const AbstractType& value) const; | 1431 void SetParameterTypeAt(intptr_t index, const AbstractType& value) const; |
| 1428 RawArray* parameter_types() const { return raw_ptr()->parameter_types_; } | 1432 RawArray* parameter_types() const { return raw_ptr()->parameter_types_; } |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 void set_is_external(bool value) const; | 1860 void set_is_external(bool value) const; |
| 1857 void set_parent_function(const Function& value) const; | 1861 void set_parent_function(const Function& value) const; |
| 1858 void set_owner(const Object& value) const; | 1862 void set_owner(const Object& value) const; |
| 1859 RawFunction* implicit_closure_function() const; | 1863 RawFunction* implicit_closure_function() const; |
| 1860 void set_implicit_closure_function(const Function& value) const; | 1864 void set_implicit_closure_function(const Function& value) const; |
| 1861 void set_num_optional_parameters(intptr_t value) const; // Encoded value. | 1865 void set_num_optional_parameters(intptr_t value) const; // Encoded value. |
| 1862 void set_kind_tag(intptr_t value) const; | 1866 void set_kind_tag(intptr_t value) const; |
| 1863 void set_data(const Object& value) const; | 1867 void set_data(const Object& value) const; |
| 1864 static RawFunction* New(); | 1868 static RawFunction* New(); |
| 1865 | 1869 |
| 1870 void BuildSinatureParameters(bool instantiate, |
| 1871 NameVisibility name_visibility, |
| 1872 const AbstractTypeArguments& instantiator, |
| 1873 const GrowableObjectArray& pieces) const; |
| 1866 RawString* BuildSignature(bool instantiate, | 1874 RawString* BuildSignature(bool instantiate, |
| 1867 NameVisibility name_visibility, | 1875 NameVisibility name_visibility, |
| 1868 const AbstractTypeArguments& instantiator) const; | 1876 const AbstractTypeArguments& instantiator) const; |
| 1869 | 1877 |
| 1870 // Check the subtype or 'more specific' relationship. | 1878 // Check the subtype or 'more specific' relationship. |
| 1871 bool TypeTest(TypeTestKind test_kind, | 1879 bool TypeTest(TypeTestKind test_kind, |
| 1872 const AbstractTypeArguments& type_arguments, | 1880 const AbstractTypeArguments& type_arguments, |
| 1873 const Function& other, | 1881 const Function& other, |
| 1874 const AbstractTypeArguments& other_type_arguments, | 1882 const AbstractTypeArguments& other_type_arguments, |
| 1875 Error* bound_error) const; | 1883 Error* bound_error) const; |
| (...skipping 4308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6184 | 6192 |
| 6185 | 6193 |
| 6186 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6194 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6187 intptr_t index) { | 6195 intptr_t index) { |
| 6188 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6196 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6189 } | 6197 } |
| 6190 | 6198 |
| 6191 } // namespace dart | 6199 } // namespace dart |
| 6192 | 6200 |
| 6193 #endif // VM_OBJECT_H_ | 6201 #endif // VM_OBJECT_H_ |
| OLD | NEW |