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

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

Issue 1151013005: Serialize maps without hashes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: _getIndexSize and name constant Created 5 years, 6 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
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | tests/isolate/message3_test.dart » ('j') | 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) 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/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 intptr_t len, 1122 intptr_t len,
1123 intptr_t tags) { 1123 intptr_t tags) {
1124 // Set the object tags. 1124 // Set the object tags.
1125 result.set_tags(tags); 1125 result.set_tags(tags);
1126 1126
1127 // Setup the object fields. 1127 // Setup the object fields.
1128 *TypeArgumentsHandle() ^= ReadObjectImpl(); 1128 *TypeArgumentsHandle() ^= ReadObjectImpl();
1129 result.SetTypeArguments(*TypeArgumentsHandle()); 1129 result.SetTypeArguments(*TypeArgumentsHandle());
1130 1130
1131 bool is_canonical = RawObject::IsCanonical(tags); 1131 bool is_canonical = RawObject::IsCanonical(tags);
1132 Object& obj = Object::Handle(isolate());
1133 1132
1134 for (intptr_t i = 0; i < len; i++) { 1133 for (intptr_t i = 0; i < len; i++) {
1135 *PassiveObjectHandle() = is_canonical ? ReadObjectImpl() : ReadObjectRef(); 1134 *PassiveObjectHandle() = is_canonical ? ReadObjectImpl() : ReadObjectRef();
1136 obj = (*PassiveObjectHandle()).raw();
1137 result.SetAt(i, *PassiveObjectHandle()); 1135 result.SetAt(i, *PassiveObjectHandle());
1138 } 1136 }
1139 } 1137 }
1140 1138
1141 1139
1142 VmIsolateSnapshotReader::VmIsolateSnapshotReader(const uint8_t* buffer, 1140 VmIsolateSnapshotReader::VmIsolateSnapshotReader(const uint8_t* buffer,
1143 intptr_t size, 1141 intptr_t size,
1144 Zone* zone) 1142 Zone* zone)
1145 : SnapshotReader(buffer, 1143 : SnapshotReader(buffer,
1146 size, 1144 size,
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 NoSafepointScope no_safepoint; 2291 NoSafepointScope no_safepoint;
2294 WriteObject(obj.raw()); 2292 WriteObject(obj.raw());
2295 UnmarkAll(); 2293 UnmarkAll();
2296 } else { 2294 } else {
2297 ThrowException(exception_type(), exception_msg()); 2295 ThrowException(exception_type(), exception_msg());
2298 } 2296 }
2299 } 2297 }
2300 2298
2301 2299
2302 } // namespace dart 2300 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | tests/isolate/message3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698