| 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 7218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7229 void SetDeletedKeys(intptr_t value) const { | 7229 void SetDeletedKeys(intptr_t value) const { |
| 7230 StoreSmi(&raw_ptr()->deleted_keys_, Smi::New(value)); | 7230 StoreSmi(&raw_ptr()->deleted_keys_, Smi::New(value)); |
| 7231 } | 7231 } |
| 7232 static intptr_t deleted_keys_offset() { | 7232 static intptr_t deleted_keys_offset() { |
| 7233 return OFFSET_OF(RawLinkedHashMap, deleted_keys_); | 7233 return OFFSET_OF(RawLinkedHashMap, deleted_keys_); |
| 7234 } | 7234 } |
| 7235 | 7235 |
| 7236 private: | 7236 private: |
| 7237 FINAL_HEAP_OBJECT_IMPLEMENTATION(LinkedHashMap, Instance); | 7237 FINAL_HEAP_OBJECT_IMPLEMENTATION(LinkedHashMap, Instance); |
| 7238 | 7238 |
| 7239 // Keep this in sync with Dart implementation (lib/compact_hash.dart). |
| 7240 static const intptr_t kInitialIndexBits = 3; |
| 7241 static const intptr_t kInitialIndexSize = 1 << (kInitialIndexBits + 1); |
| 7242 |
| 7239 // Allocate a map, but leave all fields set to null. | 7243 // Allocate a map, but leave all fields set to null. |
| 7240 // Used during deserialization (since map might contain itself as key/value). | 7244 // Used during deserialization (since map might contain itself as key/value). |
| 7241 static RawLinkedHashMap* NewUninitialized(Heap::Space space = Heap::kNew); | 7245 static RawLinkedHashMap* NewUninitialized(Heap::Space space = Heap::kNew); |
| 7242 | 7246 |
| 7243 friend class Class; | 7247 friend class Class; |
| 7244 }; | 7248 }; |
| 7245 | 7249 |
| 7246 | 7250 |
| 7247 class Closure : public AllStatic { | 7251 class Closure : public AllStatic { |
| 7248 public: | 7252 public: |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7792 | 7796 |
| 7793 | 7797 |
| 7794 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7798 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7795 intptr_t index) { | 7799 intptr_t index) { |
| 7796 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7800 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7797 } | 7801 } |
| 7798 | 7802 |
| 7799 } // namespace dart | 7803 } // namespace dart |
| 7800 | 7804 |
| 7801 #endif // VM_OBJECT_H_ | 7805 #endif // VM_OBJECT_H_ |
| OLD | NEW |