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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 return OFFSET_OF(RawClass, num_native_fields_); | 905 return OFFSET_OF(RawClass, num_native_fields_); |
906 } | 906 } |
907 | 907 |
908 RawCode* allocation_stub() const { | 908 RawCode* allocation_stub() const { |
909 return raw_ptr()->allocation_stub_; | 909 return raw_ptr()->allocation_stub_; |
910 } | 910 } |
911 void set_allocation_stub(const Code& value) const; | 911 void set_allocation_stub(const Code& value) const; |
912 | 912 |
913 RawArray* constants() const; | 913 RawArray* constants() const; |
914 | 914 |
| 915 RawFunction* GetNoSuchMethodDispatcher(const String& target_name, |
| 916 const Array& args_desc) const; |
| 917 |
915 void Finalize() const; | 918 void Finalize() const; |
916 | 919 |
917 const char* ApplyPatch(const Class& patch) const; | 920 const char* ApplyPatch(const Class& patch) const; |
918 | 921 |
919 RawError* EnsureIsFinalized(Isolate* isolate) const; | 922 RawError* EnsureIsFinalized(Isolate* isolate) const; |
920 | 923 |
921 // Allocate a class used for VM internal objects. | 924 // Allocate a class used for VM internal objects. |
922 template <class FakeObject> static RawClass* New(); | 925 template <class FakeObject> static RawClass* New(); |
923 | 926 |
924 // Allocate instance classes. | 927 // Allocate instance classes. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 void set_signature_function(const Function& value) const; | 997 void set_signature_function(const Function& value) const; |
995 void set_signature_type(const AbstractType& value) const; | 998 void set_signature_type(const AbstractType& value) const; |
996 void set_class_state(RawClass::ClassState state) const; | 999 void set_class_state(RawClass::ClassState state) const; |
997 void set_state_bits(intptr_t bits) const; | 1000 void set_state_bits(intptr_t bits) const; |
998 | 1001 |
999 void set_constants(const Array& value) const; | 1002 void set_constants(const Array& value) const; |
1000 | 1003 |
1001 void set_canonical_types(const Array& value) const; | 1004 void set_canonical_types(const Array& value) const; |
1002 RawArray* canonical_types() const; | 1005 RawArray* canonical_types() const; |
1003 | 1006 |
| 1007 RawArray* no_such_method_cache() const; |
| 1008 void set_no_such_method_cache(const Array& cache) const; |
| 1009 RawFunction* CreateNoSuchMethodDispatcher(const String& target_name, |
| 1010 const Array& args_desc) const; |
1004 void CalculateFieldOffsets() const; | 1011 void CalculateFieldOffsets() const; |
1005 | 1012 |
1006 // Assigns empty array to all raw class array fields. | 1013 // Assigns empty array to all raw class array fields. |
1007 void InitEmptyFields(); | 1014 void InitEmptyFields(); |
1008 | 1015 |
1009 static RawFunction* CheckFunctionType(const Function& func, intptr_t type); | 1016 static RawFunction* CheckFunctionType(const Function& func, intptr_t type); |
1010 RawFunction* LookupFunction(const String& name, intptr_t type) const; | 1017 RawFunction* LookupFunction(const String& name, intptr_t type) const; |
1011 RawFunction* LookupFunctionAllowPrivate(const String& name, | 1018 RawFunction* LookupFunctionAllowPrivate(const String& name, |
1012 intptr_t type) const; | 1019 intptr_t type) const; |
1013 RawField* LookupField(const String& name, intptr_t type) const; | 1020 RawField* LookupField(const String& name, intptr_t type) const; |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1400 | 1407 |
1401 RawInstance* implicit_static_closure() const; | 1408 RawInstance* implicit_static_closure() const; |
1402 void set_implicit_static_closure(const Instance& closure) const; | 1409 void set_implicit_static_closure(const Instance& closure) const; |
1403 | 1410 |
1404 RawCode* closure_allocation_stub() const; | 1411 RawCode* closure_allocation_stub() const; |
1405 void set_closure_allocation_stub(const Code& value) const; | 1412 void set_closure_allocation_stub(const Code& value) const; |
1406 | 1413 |
1407 void set_extracted_method_closure(const Function& function) const; | 1414 void set_extracted_method_closure(const Function& function) const; |
1408 RawFunction* extracted_method_closure() const; | 1415 RawFunction* extracted_method_closure() const; |
1409 | 1416 |
| 1417 void set_saved_args_desc(const Array& array) const; |
| 1418 RawArray* saved_args_desc() const; |
| 1419 |
1410 bool IsMethodExtractor() const { | 1420 bool IsMethodExtractor() const { |
1411 return kind() == RawFunction::kMethodExtractor; | 1421 return kind() == RawFunction::kMethodExtractor; |
1412 } | 1422 } |
1413 | 1423 |
1414 bool IsNoSuchMethodDispatcher() const { | 1424 bool IsNoSuchMethodDispatcher() const { |
1415 return kind() == RawFunction::kNoSuchMethodDispatcher; | 1425 return kind() == RawFunction::kNoSuchMethodDispatcher; |
1416 } | 1426 } |
1417 | 1427 |
1418 // Returns true iff an implicit closure function has been created | 1428 // Returns true iff an implicit closure function has been created |
1419 // for this function. | 1429 // for this function. |
(...skipping 4529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5949 | 5959 |
5950 | 5960 |
5951 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 5961 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
5952 intptr_t index) { | 5962 intptr_t index) { |
5953 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 5963 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
5954 } | 5964 } |
5955 | 5965 |
5956 } // namespace dart | 5966 } // namespace dart |
5957 | 5967 |
5958 #endif // VM_OBJECT_H_ | 5968 #endif // VM_OBJECT_H_ |
OLD | NEW |