OLD | NEW |
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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 if ((value <= Smi::kMaxValue) && (value >= Smi::kMinValue)) { | 594 if ((value <= Smi::kMaxValue) && (value >= Smi::kMinValue)) { |
595 return Smi::New(value); | 595 return Smi::New(value); |
596 } | 596 } |
597 if (kind_ == Snapshot::kFull) { | 597 if (kind_ == Snapshot::kFull) { |
598 return NewMint(value); | 598 return NewMint(value); |
599 } | 599 } |
600 return Mint::NewCanonical(value); | 600 return Mint::NewCanonical(value); |
601 } | 601 } |
602 | 602 |
603 | 603 |
| 604 RawStacktrace* SnapshotReader::NewStacktrace() { |
| 605 ALLOC_NEW_OBJECT(Stacktrace, object_store()->stacktrace_class()); |
| 606 } |
| 607 |
| 608 |
604 RawClass* SnapshotReader::LookupInternalClass(intptr_t class_header) { | 609 RawClass* SnapshotReader::LookupInternalClass(intptr_t class_header) { |
605 // If the header is an object Id, lookup singleton VM classes or classes | 610 // If the header is an object Id, lookup singleton VM classes or classes |
606 // stored in the object store. | 611 // stored in the object store. |
607 if (IsVMIsolateObject(class_header)) { | 612 if (IsVMIsolateObject(class_header)) { |
608 intptr_t class_id = GetVMIsolateObjectId(class_header); | 613 intptr_t class_id = GetVMIsolateObjectId(class_header); |
609 if (IsSingletonClassId(class_id)) { | 614 if (IsSingletonClassId(class_id)) { |
610 return isolate()->class_table()->At(class_id); // get singleton class. | 615 return isolate()->class_table()->At(class_id); // get singleton class. |
611 } | 616 } |
612 } else if (SerializedHeaderTag::decode(class_header) == kObjectId) { | 617 } else if (SerializedHeaderTag::decode(class_header) == kObjectId) { |
613 intptr_t class_id = SerializedHeaderData::decode(class_header); | 618 intptr_t class_id = SerializedHeaderData::decode(class_header); |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 UnmarkAll(); | 1320 UnmarkAll(); |
1316 isolate->set_long_jump_base(base); | 1321 isolate->set_long_jump_base(base); |
1317 } else { | 1322 } else { |
1318 isolate->set_long_jump_base(base); | 1323 isolate->set_long_jump_base(base); |
1319 ThrowException(exception_type(), exception_msg()); | 1324 ThrowException(exception_type(), exception_msg()); |
1320 } | 1325 } |
1321 } | 1326 } |
1322 | 1327 |
1323 | 1328 |
1324 } // namespace dart | 1329 } // namespace dart |
OLD | NEW |