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

Side by Side Diff: vm/snapshot.cc

Issue 8623003: Fix issue-545 IsObjectStoreTypeId was not updated correctly after new types (StringInterface and ... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "vm/assert.h" 7 #include "vm/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 15 matching lines...) Expand all
26 26
27 static bool IsObjectStoreClassId(intptr_t index) { 27 static bool IsObjectStoreClassId(intptr_t index) {
28 // Check if this is a class which is stored in the object store. 28 // Check if this is a class which is stored in the object store.
29 return (index >= ObjectStore::kObjectClass && index < ObjectStore::kMaxId); 29 return (index >= ObjectStore::kObjectClass && index < ObjectStore::kMaxId);
30 } 30 }
31 31
32 32
33 static bool IsObjectStoreTypeId(intptr_t index) { 33 static bool IsObjectStoreTypeId(intptr_t index) {
34 // Check if this is a type which is stored in the object store. 34 // Check if this is a type which is stored in the object store.
35 return (index >= ObjectStore::kObjectType && 35 return (index >= ObjectStore::kObjectType &&
36 index <= ObjectStore::kBoolInterface); 36 index <= ObjectStore::kListInterface);
37 } 37 }
38 38
39 39
40 // TODO(5411462): Temporary setup of snapshot for testing purposes, 40 // TODO(5411462): Temporary setup of snapshot for testing purposes,
41 // the actual creation of a snapshot maybe done differently. 41 // the actual creation of a snapshot maybe done differently.
42 const Snapshot* Snapshot::SetupFromBuffer(const void* raw_memory) { 42 const Snapshot* Snapshot::SetupFromBuffer(const void* raw_memory) {
43 ASSERT(raw_memory != NULL); 43 ASSERT(raw_memory != NULL);
44 ASSERT(kHeaderSize == sizeof(Snapshot)); 44 ASSERT(kHeaderSize == sizeof(Snapshot));
45 ASSERT(kLengthIndex == length_offset()); 45 ASSERT(kLengthIndex == length_offset());
46 ASSERT((kSnapshotFlagIndex * sizeof(int32_t)) == full_snapshot_offset()); 46 ASSERT((kSnapshotFlagIndex * sizeof(int32_t)) == full_snapshot_offset());
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 428
429 void SnapshotWriterVisitor::VisitPointers(RawObject** first, RawObject** last) { 429 void SnapshotWriterVisitor::VisitPointers(RawObject** first, RawObject** last) {
430 for (RawObject** current = first; current <= last; current++) { 430 for (RawObject** current = first; current <= last; current++) {
431 RawObject* raw_obj = *current; 431 RawObject* raw_obj = *current;
432 writer_->WriteObject(raw_obj); 432 writer_->WriteObject(raw_obj);
433 } 433 }
434 } 434 }
435 435
436 } // namespace dart 436 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698