| 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 #include "vm/bigint_operations.h" | 5 #include "vm/bigint_operations.h" |
| 6 #include "vm/object.h" | 6 #include "vm/object.h" |
| 7 #include "vm/object_store.h" | 7 #include "vm/object_store.h" |
| 8 #include "vm/snapshot.h" | 8 #include "vm/snapshot.h" |
| 9 #include "vm/symbols.h" | 9 #include "vm/symbols.h" |
| 10 #include "vm/visitor.h" | 10 #include "vm/visitor.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 void RawType::WriteTo(SnapshotWriter* writer, | 223 void RawType::WriteTo(SnapshotWriter* writer, |
| 224 intptr_t object_id, | 224 intptr_t object_id, |
| 225 Snapshot::Kind kind) { | 225 Snapshot::Kind kind) { |
| 226 ASSERT(writer != NULL); | 226 ASSERT(writer != NULL); |
| 227 | 227 |
| 228 // Write out the serialization header value for this object. | 228 // Write out the serialization header value for this object. |
| 229 writer->WriteInlinedObjectHeader(object_id); | 229 writer->WriteInlinedObjectHeader(object_id); |
| 230 | 230 |
| 231 // Write out the class and tags information. | 231 // Write out the class and tags information. |
| 232 writer->WriteVMIsolateObject(kTypeCid); | 232 writer->WriteIndexedObject(kTypeCid); |
| 233 writer->WriteIntptrValue(writer->GetObjectTags(this)); | 233 writer->WriteIntptrValue(writer->GetObjectTags(this)); |
| 234 | 234 |
| 235 // Write out all the non object pointer fields. | 235 // Write out all the non object pointer fields. |
| 236 writer->WriteIntptrValue(ptr()->token_pos_); | 236 writer->WriteIntptrValue(ptr()->token_pos_); |
| 237 writer->Write<int8_t>(ptr()->type_state_); | 237 writer->Write<int8_t>(ptr()->type_state_); |
| 238 | 238 |
| 239 // Write out all the object pointer fields. | 239 // Write out all the object pointer fields. |
| 240 SnapshotWriterVisitor visitor(writer); | 240 SnapshotWriterVisitor visitor(writer); |
| 241 visitor.VisitPointers(from(), to()); | 241 visitor.VisitPointers(from(), to()); |
| 242 } | 242 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 void RawTypeParameter::WriteTo(SnapshotWriter* writer, | 278 void RawTypeParameter::WriteTo(SnapshotWriter* writer, |
| 279 intptr_t object_id, | 279 intptr_t object_id, |
| 280 Snapshot::Kind kind) { | 280 Snapshot::Kind kind) { |
| 281 ASSERT(writer != NULL); | 281 ASSERT(writer != NULL); |
| 282 | 282 |
| 283 // Write out the serialization header value for this object. | 283 // Write out the serialization header value for this object. |
| 284 writer->WriteInlinedObjectHeader(object_id); | 284 writer->WriteInlinedObjectHeader(object_id); |
| 285 | 285 |
| 286 // Write out the class and tags information. | 286 // Write out the class and tags information. |
| 287 writer->WriteVMIsolateObject(kTypeParameterCid); | 287 writer->WriteIndexedObject(kTypeParameterCid); |
| 288 writer->WriteIntptrValue(writer->GetObjectTags(this)); | 288 writer->WriteIntptrValue(writer->GetObjectTags(this)); |
| 289 | 289 |
| 290 // Write out all the non object pointer fields. | 290 // Write out all the non object pointer fields. |
| 291 writer->WriteIntptrValue(ptr()->index_); | 291 writer->WriteIntptrValue(ptr()->index_); |
| 292 writer->WriteIntptrValue(ptr()->token_pos_); | 292 writer->WriteIntptrValue(ptr()->token_pos_); |
| 293 writer->Write<int8_t>(ptr()->type_state_); | 293 writer->Write<int8_t>(ptr()->type_state_); |
| 294 | 294 |
| 295 // Write out all the object pointer fields. | 295 // Write out all the object pointer fields. |
| 296 SnapshotWriterVisitor visitor(writer); | 296 SnapshotWriterVisitor visitor(writer); |
| 297 visitor.VisitPointers(from(), to()); | 297 visitor.VisitPointers(from(), to()); |
| (...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2328 // Write out the class and tags information. | 2328 // Write out the class and tags information. |
| 2329 writer->WriteIndexedObject(kWeakPropertyCid); | 2329 writer->WriteIndexedObject(kWeakPropertyCid); |
| 2330 writer->WriteIntptrValue(writer->GetObjectTags(this)); | 2330 writer->WriteIntptrValue(writer->GetObjectTags(this)); |
| 2331 | 2331 |
| 2332 // Write out all the other fields. | 2332 // Write out all the other fields. |
| 2333 writer->Write<RawObject*>(ptr()->key_); | 2333 writer->Write<RawObject*>(ptr()->key_); |
| 2334 writer->Write<RawObject*>(ptr()->value_); | 2334 writer->Write<RawObject*>(ptr()->value_); |
| 2335 } | 2335 } |
| 2336 | 2336 |
| 2337 } // namespace dart | 2337 } // namespace dart |
| OLD | NEW |