| 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 ALLOC_NEW_OBJECT(LiteralToken, Object::literal_token_class()); | 571 ALLOC_NEW_OBJECT(LiteralToken, Object::literal_token_class()); |
| 572 } | 572 } |
| 573 | 573 |
| 574 | 574 |
| 575 RawGrowableObjectArray* SnapshotReader::NewGrowableObjectArray() { | 575 RawGrowableObjectArray* SnapshotReader::NewGrowableObjectArray() { |
| 576 ALLOC_NEW_OBJECT(GrowableObjectArray, | 576 ALLOC_NEW_OBJECT(GrowableObjectArray, |
| 577 object_store()->growable_object_array_class()); | 577 object_store()->growable_object_array_class()); |
| 578 } | 578 } |
| 579 | 579 |
| 580 | 580 |
| 581 RawFloat32x4* SnapshotReader::NewFloat32x4(float v0, float v1, float v2, |
| 582 float v3) { |
| 583 ASSERT(kind_ == Snapshot::kFull); |
| 584 ASSERT(isolate()->no_gc_scope_depth() != 0); |
| 585 cls_ = object_store()->float32x4_class(); |
| 586 RawFloat32x4* obj = reinterpret_cast<RawFloat32x4*>( |
| 587 AllocateUninitialized(cls_, Float32x4::InstanceSize())); |
| 588 obj->ptr()->value_[0] = v0; |
| 589 obj->ptr()->value_[1] = v1; |
| 590 obj->ptr()->value_[2] = v2; |
| 591 obj->ptr()->value_[3] = v3; |
| 592 return obj; |
| 593 } |
| 594 |
| 595 |
| 596 RawUint32x4* SnapshotReader::NewUint32x4(uint32_t v0, uint32_t v1, uint32_t v2, |
| 597 uint32_t v3) { |
| 598 ASSERT(kind_ == Snapshot::kFull); |
| 599 ASSERT(isolate()->no_gc_scope_depth() != 0); |
| 600 cls_ = object_store()->uint32x4_class(); |
| 601 RawUint32x4* obj = reinterpret_cast<RawUint32x4*>( |
| 602 AllocateUninitialized(cls_, Uint32x4::InstanceSize())); |
| 603 obj->ptr()->value_[0] = v0; |
| 604 obj->ptr()->value_[1] = v1; |
| 605 obj->ptr()->value_[2] = v2; |
| 606 obj->ptr()->value_[3] = v3; |
| 607 return obj; |
| 608 } |
| 609 |
| 610 |
| 581 RawApiError* SnapshotReader::NewApiError() { | 611 RawApiError* SnapshotReader::NewApiError() { |
| 582 ALLOC_NEW_OBJECT(ApiError, Object::api_error_class()); | 612 ALLOC_NEW_OBJECT(ApiError, Object::api_error_class()); |
| 583 } | 613 } |
| 584 | 614 |
| 585 | 615 |
| 586 RawLanguageError* SnapshotReader::NewLanguageError() { | 616 RawLanguageError* SnapshotReader::NewLanguageError() { |
| 587 ALLOC_NEW_OBJECT(LanguageError, Object::language_error_class()); | 617 ALLOC_NEW_OBJECT(LanguageError, Object::language_error_class()); |
| 588 } | 618 } |
| 589 | 619 |
| 590 | 620 |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 UnmarkAll(); | 1345 UnmarkAll(); |
| 1316 isolate->set_long_jump_base(base); | 1346 isolate->set_long_jump_base(base); |
| 1317 } else { | 1347 } else { |
| 1318 isolate->set_long_jump_base(base); | 1348 isolate->set_long_jump_base(base); |
| 1319 ThrowException(exception_type(), exception_msg()); | 1349 ThrowException(exception_type(), exception_msg()); |
| 1320 } | 1350 } |
| 1321 } | 1351 } |
| 1322 | 1352 |
| 1323 | 1353 |
| 1324 } // namespace dart | 1354 } // namespace dart |
| OLD | NEW |