| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 RawInt32x4* obj = reinterpret_cast<RawInt32x4*>( | 641 RawInt32x4* obj = reinterpret_cast<RawInt32x4*>( |
| 642 AllocateUninitialized(cls_, Int32x4::InstanceSize())); | 642 AllocateUninitialized(cls_, Int32x4::InstanceSize())); |
| 643 obj->ptr()->value_[0] = v0; | 643 obj->ptr()->value_[0] = v0; |
| 644 obj->ptr()->value_[1] = v1; | 644 obj->ptr()->value_[1] = v1; |
| 645 obj->ptr()->value_[2] = v2; | 645 obj->ptr()->value_[2] = v2; |
| 646 obj->ptr()->value_[3] = v3; | 646 obj->ptr()->value_[3] = v3; |
| 647 return obj; | 647 return obj; |
| 648 } | 648 } |
| 649 | 649 |
| 650 | 650 |
| 651 RawFloat64x2* SnapshotReader::NewFloat64x2(double v0, double v1) { |
| 652 ASSERT(kind_ == Snapshot::kFull); |
| 653 ASSERT(isolate()->no_gc_scope_depth() != 0); |
| 654 cls_ = object_store()->float64x2_class(); |
| 655 RawFloat64x2* obj = reinterpret_cast<RawFloat64x2*>( |
| 656 AllocateUninitialized(cls_, Float64x2::InstanceSize())); |
| 657 obj->ptr()->value_[0] = v0; |
| 658 obj->ptr()->value_[1] = v1; |
| 659 return obj; |
| 660 } |
| 661 |
| 662 |
| 651 RawApiError* SnapshotReader::NewApiError() { | 663 RawApiError* SnapshotReader::NewApiError() { |
| 652 ALLOC_NEW_OBJECT(ApiError, Object::api_error_class()); | 664 ALLOC_NEW_OBJECT(ApiError, Object::api_error_class()); |
| 653 } | 665 } |
| 654 | 666 |
| 655 | 667 |
| 656 RawLanguageError* SnapshotReader::NewLanguageError() { | 668 RawLanguageError* SnapshotReader::NewLanguageError() { |
| 657 ALLOC_NEW_OBJECT(LanguageError, Object::language_error_class()); | 669 ALLOC_NEW_OBJECT(LanguageError, Object::language_error_class()); |
| 658 } | 670 } |
| 659 | 671 |
| 660 | 672 |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1519 NoGCScope no_gc; | 1531 NoGCScope no_gc; |
| 1520 WriteObject(obj.raw()); | 1532 WriteObject(obj.raw()); |
| 1521 UnmarkAll(); | 1533 UnmarkAll(); |
| 1522 } else { | 1534 } else { |
| 1523 ThrowException(exception_type(), exception_msg()); | 1535 ThrowException(exception_type(), exception_msg()); |
| 1524 } | 1536 } |
| 1525 } | 1537 } |
| 1526 | 1538 |
| 1527 | 1539 |
| 1528 } // namespace dart | 1540 } // namespace dart |
| OLD | NEW |