| 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 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 void set_allocation_stub(const Code& value) const; | 934 void set_allocation_stub(const Code& value) const; |
| 935 | 935 |
| 936 RawArray* constants() const; | 936 RawArray* constants() const; |
| 937 | 937 |
| 938 RawFunction* GetInvocationDispatcher(const String& target_name, | 938 RawFunction* GetInvocationDispatcher(const String& target_name, |
| 939 const Array& args_desc, | 939 const Array& args_desc, |
| 940 RawFunction::Kind kind) const; | 940 RawFunction::Kind kind) const; |
| 941 | 941 |
| 942 void Finalize() const; | 942 void Finalize() const; |
| 943 | 943 |
| 944 const char* ApplyPatch(const Class& patch) const; | 944 // Apply given patch class to this class. |
| 945 // Return true on success, or false and error otherwise. |
| 946 bool ApplyPatch(const Class& patch, Error* error) const; |
| 945 | 947 |
| 946 RawError* EnsureIsFinalized(Isolate* isolate) const; | 948 RawError* EnsureIsFinalized(Isolate* isolate) const; |
| 947 | 949 |
| 948 // Allocate a class used for VM internal objects. | 950 // Allocate a class used for VM internal objects. |
| 949 template <class FakeObject> static RawClass* New(); | 951 template <class FakeObject> static RawClass* New(); |
| 950 | 952 |
| 951 // Allocate instance classes. | 953 // Allocate instance classes. |
| 952 static RawClass* New(const String& name, | 954 static RawClass* New(const String& name, |
| 953 const Script& script, | 955 const Script& script, |
| 954 intptr_t token_pos); | 956 intptr_t token_pos); |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1657 String* error_message) const; | 1659 String* error_message) const; |
| 1658 bool AreValidArguments(const ArgumentsDescriptor& args_desc, | 1660 bool AreValidArguments(const ArgumentsDescriptor& args_desc, |
| 1659 String* error_message) const; | 1661 String* error_message) const; |
| 1660 | 1662 |
| 1661 // Fully qualified name uniquely identifying the function under gdb and during | 1663 // Fully qualified name uniquely identifying the function under gdb and during |
| 1662 // ast printing. The special ':' character, if present, is replaced by '_'. | 1664 // ast printing. The special ':' character, if present, is replaced by '_'. |
| 1663 const char* ToFullyQualifiedCString() const; | 1665 const char* ToFullyQualifiedCString() const; |
| 1664 | 1666 |
| 1665 // Returns true if this function has parameters that are compatible with the | 1667 // Returns true if this function has parameters that are compatible with the |
| 1666 // parameters of the other function in order for this function to override the | 1668 // parameters of the other function in order for this function to override the |
| 1667 // other function. Parameter types are ignored. | 1669 // other function. |
| 1668 bool HasCompatibleParametersWith(const Function& other) const; | 1670 bool HasCompatibleParametersWith(const Function& other, |
| 1671 Error* malformed_error) const; |
| 1669 | 1672 |
| 1670 // Returns true if the type of this function is a subtype of the type of | 1673 // Returns true if the type of this function is a subtype of the type of |
| 1671 // the other function. | 1674 // the other function. |
| 1672 bool IsSubtypeOf(const AbstractTypeArguments& type_arguments, | 1675 bool IsSubtypeOf(const AbstractTypeArguments& type_arguments, |
| 1673 const Function& other, | 1676 const Function& other, |
| 1674 const AbstractTypeArguments& other_type_arguments, | 1677 const AbstractTypeArguments& other_type_arguments, |
| 1675 Error* malformed_error) const { | 1678 Error* malformed_error) const { |
| 1676 return TypeTest(kIsSubtypeOf, | 1679 return TypeTest(kIsSubtypeOf, |
| 1677 type_arguments, | 1680 type_arguments, |
| 1678 other, | 1681 other, |
| (...skipping 4374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6053 | 6056 |
| 6054 | 6057 |
| 6055 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6058 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6056 intptr_t index) { | 6059 intptr_t index) { |
| 6057 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6060 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6058 } | 6061 } |
| 6059 | 6062 |
| 6060 } // namespace dart | 6063 } // namespace dart |
| 6061 | 6064 |
| 6062 #endif // VM_OBJECT_H_ | 6065 #endif // VM_OBJECT_H_ |
| OLD | NEW |