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

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

Issue 2001713002: - Removed the kWatchedBit and the associated weak property handling (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove residual watched bit. Created 4 years, 7 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
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_SNAPSHOT_H_ 5 #ifndef VM_SNAPSHOT_H_
6 #define VM_SNAPSHOT_H_ 6 #define VM_SNAPSHOT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 291
292 double ReadDouble() { 292 double ReadDouble() {
293 double result; 293 double result;
294 stream_.ReadBytes(reinterpret_cast<uint8_t*>(&result), sizeof(result)); 294 stream_.ReadBytes(reinterpret_cast<uint8_t*>(&result), sizeof(result));
295 return result; 295 return result;
296 } 296 }
297 297
298 intptr_t ReadTags() { 298 intptr_t ReadTags() {
299 const intptr_t tags = static_cast<intptr_t>(Read<int8_t>()) & 0xff; 299 const intptr_t tags = static_cast<intptr_t>(Read<int8_t>()) & 0xff;
300 ASSERT(SerializedHeaderTag::decode(tags) != kObjectId);
301 return tags; 300 return tags;
302 } 301 }
303 302
304 const uint8_t* CurrentBufferAddress() const { 303 const uint8_t* CurrentBufferAddress() const {
305 return stream_.AddressOfCurrentPosition(); 304 return stream_.AddressOfCurrentPosition();
306 } 305 }
307 306
308 void Advance(intptr_t value) { 307 void Advance(intptr_t value) {
309 stream_.Advance(value); 308 stream_.Advance(value);
310 } 309 }
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 // Write serialization header information for an object. 749 // Write serialization header information for an object.
751 void WriteInlinedObjectHeader(intptr_t id) { 750 void WriteInlinedObjectHeader(intptr_t id) {
752 ASSERT(id <= kMaxObjectId); 751 ASSERT(id <= kMaxObjectId);
753 intptr_t value = 0; 752 intptr_t value = 0;
754 value = SerializedHeaderTag::update(kInlined, value); 753 value = SerializedHeaderTag::update(kInlined, value);
755 value = SerializedHeaderData::update(id, value); 754 value = SerializedHeaderData::update(id, value);
756 Write<int32_t>(value); 755 Write<int32_t>(value);
757 } 756 }
758 757
759 void WriteTags(intptr_t tags) { 758 void WriteTags(intptr_t tags) {
760 ASSERT(SerializedHeaderTag::decode(tags) != kObjectId);
761 const intptr_t flags = tags & 0xff; 759 const intptr_t flags = tags & 0xff;
762 Write<int8_t>(static_cast<int8_t>(flags)); 760 Write<int8_t>(static_cast<int8_t>(flags));
763 } 761 }
764 762
765 // Write out a buffer of bytes. 763 // Write out a buffer of bytes.
766 void WriteBytes(const uint8_t* addr, intptr_t len) { 764 void WriteBytes(const uint8_t* addr, intptr_t len) {
767 stream_.WriteBytes(addr, len); 765 stream_.WriteBytes(addr, len);
768 } 766 }
769 767
770 void WriteDouble(double value) { 768 void WriteDouble(double value) {
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 private: 1211 private:
1214 SnapshotWriter* writer_; 1212 SnapshotWriter* writer_;
1215 bool as_references_; 1213 bool as_references_;
1216 1214
1217 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); 1215 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor);
1218 }; 1216 };
1219 1217
1220 } // namespace dart 1218 } // namespace dart
1221 1219
1222 #endif // VM_SNAPSHOT_H_ 1220 #endif // VM_SNAPSHOT_H_
OLDNEW
« runtime/vm/raw_object.h ('K') | « runtime/vm/scavenger.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698