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

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

Issue 2572563004: Improve the casing of Stackmap and Stacktrace. (Closed)
Patch Set: Build fixes Created 4 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/simulator_dbc.h » ('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/native_entry.h" 5 #include "vm/native_entry.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/stub_code.h" 9 #include "vm/stub_code.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 1329
1330 1330
1331 void RawCodeSourceMap::WriteTo(SnapshotWriter* writer, 1331 void RawCodeSourceMap::WriteTo(SnapshotWriter* writer,
1332 intptr_t object_id, 1332 intptr_t object_id,
1333 Snapshot::Kind kind, 1333 Snapshot::Kind kind,
1334 bool as_reference) { 1334 bool as_reference) {
1335 UNREACHABLE(); 1335 UNREACHABLE();
1336 } 1336 }
1337 1337
1338 1338
1339 RawStackmap* Stackmap::ReadFrom(SnapshotReader* reader, 1339 RawStackMap* StackMap::ReadFrom(SnapshotReader* reader,
1340 intptr_t object_id, 1340 intptr_t object_id,
1341 intptr_t tags, 1341 intptr_t tags,
1342 Snapshot::Kind kind, 1342 Snapshot::Kind kind,
1343 bool as_reference) { 1343 bool as_reference) {
1344 UNREACHABLE(); 1344 UNREACHABLE();
1345 return Stackmap::null(); 1345 return StackMap::null();
1346 } 1346 }
1347 1347
1348 1348
1349 void RawStackmap::WriteTo(SnapshotWriter* writer, 1349 void RawStackMap::WriteTo(SnapshotWriter* writer,
1350 intptr_t object_id, 1350 intptr_t object_id,
1351 Snapshot::Kind kind, 1351 Snapshot::Kind kind,
1352 bool as_reference) { 1352 bool as_reference) {
1353 UNREACHABLE(); 1353 UNREACHABLE();
1354 } 1354 }
1355 1355
1356 1356
1357 RawLocalVarDescriptors* LocalVarDescriptors::ReadFrom(SnapshotReader* reader, 1357 RawLocalVarDescriptors* LocalVarDescriptors::ReadFrom(SnapshotReader* reader,
1358 intptr_t object_id, 1358 intptr_t object_id,
1359 intptr_t tags, 1359 intptr_t tags,
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
2846 2846
2847 // Write out the class and tags information. 2847 // Write out the class and tags information.
2848 writer->WriteIndexedObject(kSendPortCid); 2848 writer->WriteIndexedObject(kSendPortCid);
2849 writer->WriteTags(writer->GetObjectTags(this)); 2849 writer->WriteTags(writer->GetObjectTags(this));
2850 2850
2851 writer->Write<uint64_t>(ptr()->id_); 2851 writer->Write<uint64_t>(ptr()->id_);
2852 writer->Write<uint64_t>(ptr()->origin_id_); 2852 writer->Write<uint64_t>(ptr()->origin_id_);
2853 } 2853 }
2854 2854
2855 2855
2856 RawStacktrace* Stacktrace::ReadFrom(SnapshotReader* reader, 2856 RawStackTrace* StackTrace::ReadFrom(SnapshotReader* reader,
2857 intptr_t object_id, 2857 intptr_t object_id,
2858 intptr_t tags, 2858 intptr_t tags,
2859 Snapshot::Kind kind, 2859 Snapshot::Kind kind,
2860 bool as_reference) { 2860 bool as_reference) {
2861 UNREACHABLE(); // Stacktraces are not sent in a snapshot. 2861 UNREACHABLE(); // StackTraces are not sent in a snapshot.
2862 return Stacktrace::null(); 2862 return StackTrace::null();
2863 } 2863 }
2864 2864
2865 2865
2866 void RawStacktrace::WriteTo(SnapshotWriter* writer, 2866 void RawStackTrace::WriteTo(SnapshotWriter* writer,
2867 intptr_t object_id, 2867 intptr_t object_id,
2868 Snapshot::Kind kind, 2868 Snapshot::Kind kind,
2869 bool as_reference) { 2869 bool as_reference) {
2870 ASSERT(kind == Snapshot::kMessage); 2870 ASSERT(kind == Snapshot::kMessage);
2871 writer->SetWriteException(Exceptions::kArgument, 2871 writer->SetWriteException(Exceptions::kArgument,
2872 "Illegal argument in isolate message" 2872 "Illegal argument in isolate message"
2873 " : (object is a stacktrace)"); 2873 " : (object is a stacktrace)");
2874 } 2874 }
2875 2875
2876 2876
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
3008 // We do not allow objects with native fields in an isolate message. 3008 // We do not allow objects with native fields in an isolate message.
3009 writer->SetWriteException(Exceptions::kArgument, 3009 writer->SetWriteException(Exceptions::kArgument,
3010 "Illegal argument in isolate message" 3010 "Illegal argument in isolate message"
3011 " : (object is a UserTag)"); 3011 " : (object is a UserTag)");
3012 } else { 3012 } else {
3013 UNREACHABLE(); 3013 UNREACHABLE();
3014 } 3014 }
3015 } 3015 }
3016 3016
3017 } // namespace dart 3017 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/simulator_dbc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698