Index: runtime/vm/raw_object_snapshot.cc |
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc |
index 838145c485dbc1b8869a827f8aab7359da9f3881..3fa476a5263970d9f27a8a57ac1b39dcb90b7de6 100644 |
--- a/runtime/vm/raw_object_snapshot.cc |
+++ b/runtime/vm/raw_object_snapshot.cc |
@@ -32,7 +32,7 @@ RawClass* Class::ReadFrom(SnapshotReader* reader, |
if ((kind == Snapshot::kFull) || |
(kind == Snapshot::kScript && !RawObject::IsCreatedFromSnapshot(tags))) { |
// Read in the base information. |
- int32_t class_id = reader->Read<int32_t>(); |
+ cid_t class_id = reader->Read<cid_t>(); |
// Allocate class object of specified kind. |
if (kind == Snapshot::kFull) { |
@@ -96,8 +96,8 @@ void RawClass::WriteTo(SnapshotWriter* writer, |
// Write out all the non object pointer fields. |
// NOTE: cpp_vtable_ is not written. |
- int32_t class_id = ptr()->id_; |
- writer->Write<int32_t>(class_id); |
+ cid_t class_id = ptr()->id_; |
+ writer->Write<cid_t>(class_id); |
if (!RawObject::IsInternalVMdefinedClassId(class_id)) { |
// We don't write the instance size of VM defined classes as they |
// are already setup during initialization as part of pre populating |
@@ -708,7 +708,7 @@ RawFunction* Function::ReadFrom(SnapshotReader* reader, |
func.set_num_fixed_parameters(reader->Read<int16_t>()); |
func.set_num_optional_parameters(reader->Read<int16_t>()); |
func.set_deoptimization_counter(reader->Read<int16_t>()); |
- func.set_regexp_cid(reader->Read<int16_t>()); |
+ func.set_regexp_cid(reader->Read<cid_t>()); |
func.set_kind_tag(reader->Read<uint32_t>()); |
func.set_optimized_instruction_count(reader->Read<uint16_t>()); |
func.set_optimized_call_site_count(reader->Read<uint16_t>()); |
@@ -752,7 +752,7 @@ void RawFunction::WriteTo(SnapshotWriter* writer, |
writer->Write<int16_t>(ptr()->num_fixed_parameters_); |
writer->Write<int16_t>(ptr()->num_optional_parameters_); |
writer->Write<int16_t>(ptr()->deoptimization_counter_); |
- writer->Write<int16_t>(ptr()->regexp_cid_); |
+ writer->Write<cid_t>(ptr()->regexp_cid_); |
writer->Write<uint32_t>(ptr()->kind_tag_); |
writer->Write<uint16_t>(ptr()->optimized_instruction_count_); |
writer->Write<uint16_t>(ptr()->optimized_call_site_count_); |
@@ -1041,11 +1041,11 @@ RawLibrary* Library::ReadFrom(SnapshotReader* reader, |
// Set all non object fields. |
library.StoreNonPointer(&library.raw_ptr()->index_, |
- reader->Read<int32_t>()); |
+ reader->Read<cid_t>()); |
library.StoreNonPointer(&library.raw_ptr()->num_imports_, |
- reader->Read<int32_t>()); |
+ reader->Read<cid_t>()); |
library.StoreNonPointer(&library.raw_ptr()->num_anonymous_, |
- reader->Read<int32_t>()); |
+ reader->Read<cid_t>()); |
library.StoreNonPointer(&library.raw_ptr()->corelib_imported_, |
reader->Read<bool>()); |
library.StoreNonPointer(&library.raw_ptr()->is_dart_scheme_, |
@@ -1104,9 +1104,9 @@ void RawLibrary::WriteTo(SnapshotWriter* writer, |
writer->WriteObjectImpl(ptr()->url_); |
} else { |
// Write out all non object fields. |
- writer->Write<int32_t>(ptr()->index_); |
- writer->Write<int32_t>(ptr()->num_imports_); |
- writer->Write<int32_t>(ptr()->num_anonymous_); |
+ writer->Write<cid_t>(ptr()->index_); |
+ writer->Write<cid_t>(ptr()->num_imports_); |
+ writer->Write<cid_t>(ptr()->num_anonymous_); |
writer->Write<bool>(ptr()->corelib_imported_); |
writer->Write<bool>(ptr()->is_dart_scheme_); |
writer->Write<bool>(ptr()->debuggable_); |
@@ -1147,7 +1147,7 @@ RawLibraryPrefix* LibraryPrefix::ReadFrom(SnapshotReader* reader, |
// Set all non object fields. |
prefix.StoreNonPointer(&prefix.raw_ptr()->num_imports_, |
- reader->Read<int32_t>()); |
+ reader->Read<cid_t>()); |
prefix.StoreNonPointer(&prefix.raw_ptr()->is_deferred_load_, |
reader->Read<bool>()); |
prefix.StoreNonPointer(&prefix.raw_ptr()->is_loaded_, reader->Read<bool>()); |
@@ -1182,7 +1182,7 @@ void RawLibraryPrefix::WriteTo(SnapshotWriter* writer, |
writer->WriteTags(writer->GetObjectTags(this)); |
// Write out all non object fields. |
- writer->Write<int32_t>(ptr()->num_imports_); |
+ writer->Write<cid_t>(ptr()->num_imports_); |
writer->Write<bool>(ptr()->is_deferred_load_); |
writer->Write<bool>(ptr()->is_loaded_); |