| 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/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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 // we need to initialize any remaining padding area with the Null object. | 535 // we need to initialize any remaining padding area with the Null object. |
| 536 while (offset < instance_size) { | 536 while (offset < instance_size) { |
| 537 result->SetFieldAtOffset(offset, Object::null_object()); | 537 result->SetFieldAtOffset(offset, Object::null_object()); |
| 538 offset += kWordSize; | 538 offset += kWordSize; |
| 539 } | 539 } |
| 540 } | 540 } |
| 541 if (RawObject::IsCanonical(tags)) { | 541 if (RawObject::IsCanonical(tags)) { |
| 542 if (kind_ == Snapshot::kFull) { | 542 if (kind_ == Snapshot::kFull) { |
| 543 result->SetCanonical(); | 543 result->SetCanonical(); |
| 544 } else { | 544 } else { |
| 545 *result = result->CheckAndCanonicalize(thread(), NULL); | 545 *result = result->CheckAndCanonicalize(NULL); |
| 546 ASSERT(!result->IsNull()); | 546 ASSERT(!result->IsNull()); |
| 547 } | 547 } |
| 548 } | 548 } |
| 549 } | 549 } |
| 550 return result->raw(); | 550 return result->raw(); |
| 551 } | 551 } |
| 552 | 552 |
| 553 | 553 |
| 554 void SnapshotReader::AddBackRef(intptr_t id, | 554 void SnapshotReader::AddBackRef(intptr_t id, |
| 555 Object* obj, | 555 Object* obj, |
| (...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2666 if (setjmp(*jump.Set()) == 0) { | 2666 if (setjmp(*jump.Set()) == 0) { |
| 2667 NoSafepointScope no_safepoint; | 2667 NoSafepointScope no_safepoint; |
| 2668 WriteObject(obj.raw()); | 2668 WriteObject(obj.raw()); |
| 2669 } else { | 2669 } else { |
| 2670 ThrowException(exception_type(), exception_msg()); | 2670 ThrowException(exception_type(), exception_msg()); |
| 2671 } | 2671 } |
| 2672 } | 2672 } |
| 2673 | 2673 |
| 2674 | 2674 |
| 2675 } // namespace dart | 2675 } // namespace dart |
| OLD | NEW |