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

Side by Side Diff: runtime/vm/clustered_snapshot.cc

Issue 2953753002: Revert "Inline instance object hash code into object header on 64 bit." (Closed)
Patch Set: Created 3 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/vm/become.cc ('k') | runtime/vm/freelist.h » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 #include "vm/clustered_snapshot.h" 5 #include "vm/clustered_snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 22 matching lines...) Expand all
33 return reinterpret_cast<RawObject*>(address + kHeapObjectTag); 33 return reinterpret_cast<RawObject*>(address + kHeapObjectTag);
34 } 34 }
35 35
36 36
37 void Deserializer::InitializeHeader(RawObject* raw, 37 void Deserializer::InitializeHeader(RawObject* raw,
38 intptr_t class_id, 38 intptr_t class_id,
39 intptr_t size, 39 intptr_t size,
40 bool is_vm_isolate, 40 bool is_vm_isolate,
41 bool is_canonical) { 41 bool is_canonical) {
42 ASSERT(Utils::IsAligned(size, kObjectAlignment)); 42 ASSERT(Utils::IsAligned(size, kObjectAlignment));
43 uint32_t tags = 0; 43 uword tags = 0;
44 tags = RawObject::ClassIdTag::update(class_id, tags); 44 tags = RawObject::ClassIdTag::update(class_id, tags);
45 tags = RawObject::SizeTag::update(size, tags); 45 tags = RawObject::SizeTag::update(size, tags);
46 tags = RawObject::VMHeapObjectTag::update(is_vm_isolate, tags); 46 tags = RawObject::VMHeapObjectTag::update(is_vm_isolate, tags);
47 tags = RawObject::CanonicalObjectTag::update(is_canonical, tags); 47 tags = RawObject::CanonicalObjectTag::update(is_canonical, tags);
48 raw->ptr()->tags_ = tags; 48 raw->ptr()->tags_ = tags;
49 #if defined(HASH_IN_OBJECT_HEADER)
50 raw->ptr()->hash_ = 0;
51 #endif
52 } 49 }
53 50
54 51
55 #if !defined(DART_PRECOMPILED_RUNTIME) 52 #if !defined(DART_PRECOMPILED_RUNTIME)
56 class ClassSerializationCluster : public SerializationCluster { 53 class ClassSerializationCluster : public SerializationCluster {
57 public: 54 public:
58 explicit ClassSerializationCluster(intptr_t num_cids) 55 explicit ClassSerializationCluster(intptr_t num_cids)
59 : predefined_(kNumPredefinedCids), objects_(num_cids) {} 56 : predefined_(kNumPredefinedCids), objects_(num_cids) {}
60 virtual ~ClassSerializationCluster() {} 57 virtual ~ClassSerializationCluster() {}
61 58
(...skipping 5580 matching lines...) Expand 10 before | Expand all | Expand 10 after
5642 thread_->isolate()->SetupImagePage(data_buffer_, 5639 thread_->isolate()->SetupImagePage(data_buffer_,
5643 /* is_executable */ false); 5640 /* is_executable */ false);
5644 } 5641 }
5645 5642
5646 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); 5643 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store());
5647 5644
5648 return ApiError::null(); 5645 return ApiError::null();
5649 } 5646 }
5650 5647
5651 } // namespace dart 5648 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/become.cc ('k') | runtime/vm/freelist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698