Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: runtime/vm/object.h

Issue 1151013005: Serialize maps without hashes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: _getIndexSize and name constant Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/lib/compact_hash.dart ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « runtime/lib/compact_hash.dart ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698