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 5014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5025 void EnsureCapacity() const; | 5025 void EnsureCapacity() const; |
5026 | 5026 |
5027 void Insert(const Smi& class_id, const Function& target) const; | 5027 void Insert(const Smi& class_id, const Function& target) const; |
5028 | 5028 |
5029 static intptr_t InstanceSize() { | 5029 static intptr_t InstanceSize() { |
5030 return RoundedAllocationSize(sizeof(RawMegamorphicCache)); | 5030 return RoundedAllocationSize(sizeof(RawMegamorphicCache)); |
5031 } | 5031 } |
5032 | 5032 |
5033 private: | 5033 private: |
5034 friend class Class; | 5034 friend class Class; |
| 5035 friend class MegamorphicCacheTable; |
5035 | 5036 |
5036 static RawMegamorphicCache* New(); | 5037 static RawMegamorphicCache* New(); |
5037 | 5038 |
5038 void set_target_name(const String& value) const; | 5039 void set_target_name(const String& value) const; |
5039 void set_arguments_descriptor(const Array& value) const; | 5040 void set_arguments_descriptor(const Array& value) const; |
5040 | 5041 |
5041 enum { | 5042 enum { |
5042 kClassIdIndex, | 5043 kClassIdIndex, |
5043 kTargetFunctionIndex, | 5044 kTargetFunctionIndex, |
5044 kEntryLength, | 5045 kEntryLength, |
(...skipping 3665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8710 | 8711 |
8711 inline void TypeArguments::SetHash(intptr_t value) const { | 8712 inline void TypeArguments::SetHash(intptr_t value) const { |
8712 // This is only safe because we create a new Smi, which does not cause | 8713 // This is only safe because we create a new Smi, which does not cause |
8713 // heap allocation. | 8714 // heap allocation. |
8714 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8715 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8715 } | 8716 } |
8716 | 8717 |
8717 } // namespace dart | 8718 } // namespace dart |
8718 | 8719 |
8719 #endif // VM_OBJECT_H_ | 8720 #endif // VM_OBJECT_H_ |
OLD | NEW |