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

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

Issue 2662333002: Start adding vm/cc tests for rewind functionality. (Closed)
Patch Set: code review Created 3 years, 10 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/tests/vm/vm.status ('k') | runtime/vm/debugger_test.cc » ('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/dart_api_message.h" 5 #include "vm/dart_api_message.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/snapshot_ids.h" 7 #include "vm/snapshot_ids.h"
8 #include "vm/symbols.h" 8 #include "vm/symbols.h"
9 #include "vm/unicode.h" 9 #include "vm/unicode.h"
10 10
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 break; 1293 break;
1294 } 1294 }
1295 case Dart_CObject_kCapability: { 1295 case Dart_CObject_kCapability: {
1296 WriteInlinedHeader(object); 1296 WriteInlinedHeader(object);
1297 WriteIndexedObject(kCapabilityCid); 1297 WriteIndexedObject(kCapabilityCid);
1298 WriteTags(0); 1298 WriteTags(0);
1299 Write<uint64_t>(object->value.as_capability.id); 1299 Write<uint64_t>(object->value.as_capability.id);
1300 break; 1300 break;
1301 } 1301 }
1302 default: 1302 default:
1303 UNREACHABLE(); 1303 FATAL1("Unexpected Dart_CObject_Type %d\n", type);
1304 } 1304 }
1305 1305
1306 return true; 1306 return true;
1307 } 1307 }
1308 1308
1309 1309
1310 bool ApiMessageWriter::WriteCMessage(Dart_CObject* object) { 1310 bool ApiMessageWriter::WriteCMessage(Dart_CObject* object) {
1311 bool success = WriteCObject(object); 1311 bool success = WriteCObject(object);
1312 if (!success) { 1312 if (!success) {
1313 UnmarkAllCObjects(object); 1313 UnmarkAllCObjects(object);
1314 return false; 1314 return false;
1315 } 1315 }
1316 // Write out all objects that were added to the forward list and have 1316 // Write out all objects that were added to the forward list and have
1317 // not been serialized yet. These would typically be fields of arrays. 1317 // not been serialized yet. These would typically be fields of arrays.
1318 // NOTE: The forward list might grow as we process the list. 1318 // NOTE: The forward list might grow as we process the list.
1319 for (intptr_t i = 0; i < forward_id_; i++) { 1319 for (intptr_t i = 0; i < forward_id_; i++) {
1320 success = WriteForwardedCObject(forward_list_[i]); 1320 success = WriteForwardedCObject(forward_list_[i]);
1321 if (!success) { 1321 if (!success) {
1322 UnmarkAllCObjects(object); 1322 UnmarkAllCObjects(object);
1323 return false; 1323 return false;
1324 } 1324 }
1325 } 1325 }
1326 UnmarkAllCObjects(object); 1326 UnmarkAllCObjects(object);
1327 return true; 1327 return true;
1328 } 1328 }
1329 1329
1330 } // namespace dart 1330 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/debugger_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698