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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 8773026: Canonicalize TypeArguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
===================================================================
--- runtime/vm/raw_object_snapshot.cc (revision 2130)
+++ runtime/vm/raw_object_snapshot.cc (working copy)
@@ -304,18 +304,22 @@
Snapshot::Kind kind) {
ASSERT(reader != NULL);
+ const bool is_canonical = reader->Read<bool>();
// Read the length so that we can determine instance size to allocate.
RawSmi* smi_len = GetSmi(reader->Read<intptr_t>());
intptr_t len = Smi::Value(smi_len);
- TypeArguments& type_array = TypeArguments::Handle(TypeArguments::New(len));
- reader->AddBackwardReference(object_id, &type_array);
+ TypeArguments& type_arguments =
+ TypeArguments::Handle(TypeArguments::New(len));
+ reader->AddBackwardReference(object_id, &type_arguments);
AbstractType& type = AbstractType::Handle();
for (intptr_t i = 0; i < len; i++) {
type ^= reader->ReadObject();
- type_array.SetTypeAt(i, type);
+ type_arguments.SetTypeAt(i, type);
}
- return type_array.raw();
+ type_arguments.set_is_canonical(is_canonical);
+
+ return type_arguments.raw();
}
@@ -330,6 +334,7 @@
// Write out the class information.
writer->WriteObjectHeader(kObjectId, Object::kTypeArgumentsClass);
+ writer->Write<bool>(ptr()->is_canonical_);
// Write out the length field.
writer->Write<RawObject*>(ptr()->length_);
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698