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

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

Issue 12335111: Resubmit change 19074. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/snapshot.h ('k') | no next file » | 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/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 if ((value <= Smi::kMaxValue) && (value >= Smi::kMinValue)) { 624 if ((value <= Smi::kMaxValue) && (value >= Smi::kMinValue)) {
625 return Smi::New(value); 625 return Smi::New(value);
626 } 626 }
627 if (kind_ == Snapshot::kFull) { 627 if (kind_ == Snapshot::kFull) {
628 return NewMint(value); 628 return NewMint(value);
629 } 629 }
630 return Mint::NewCanonical(value); 630 return Mint::NewCanonical(value);
631 } 631 }
632 632
633 633
634 RawStacktrace* SnapshotReader::NewStacktrace() {
635 ALLOC_NEW_OBJECT(Stacktrace, object_store()->stacktrace_class());
636 }
637
638
634 RawClass* SnapshotReader::LookupInternalClass(intptr_t class_header) { 639 RawClass* SnapshotReader::LookupInternalClass(intptr_t class_header) {
635 // If the header is an object Id, lookup singleton VM classes or classes 640 // If the header is an object Id, lookup singleton VM classes or classes
636 // stored in the object store. 641 // stored in the object store.
637 if (IsVMIsolateObject(class_header)) { 642 if (IsVMIsolateObject(class_header)) {
638 intptr_t class_id = GetVMIsolateObjectId(class_header); 643 intptr_t class_id = GetVMIsolateObjectId(class_header);
639 if (IsSingletonClassId(class_id)) { 644 if (IsSingletonClassId(class_id)) {
640 return isolate()->class_table()->At(class_id); // get singleton class. 645 return isolate()->class_table()->At(class_id); // get singleton class.
641 } 646 }
642 } else if (SerializedHeaderTag::decode(class_header) == kObjectId) { 647 } else if (SerializedHeaderTag::decode(class_header) == kObjectId) {
643 intptr_t class_id = SerializedHeaderData::decode(class_header); 648 intptr_t class_id = SerializedHeaderData::decode(class_header);
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 UnmarkAll(); 1350 UnmarkAll();
1346 isolate->set_long_jump_base(base); 1351 isolate->set_long_jump_base(base);
1347 } else { 1352 } else {
1348 isolate->set_long_jump_base(base); 1353 isolate->set_long_jump_base(base);
1349 ThrowException(exception_type(), exception_msg()); 1354 ThrowException(exception_type(), exception_msg());
1350 } 1355 }
1351 } 1356 }
1352 1357
1353 1358
1354 } // namespace dart 1359 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698