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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 (class_id <= kExternalTypedDataFloat32x4ArrayCid)); | 472 (class_id <= kExternalTypedDataFloat32x4ArrayCid)); |
473 return isolate()->class_table()->At(class_id); | 473 return isolate()->class_table()->At(class_id); |
474 } | 474 } |
475 cls_ = Object::class_class(); | 475 cls_ = Object::class_class(); |
476 RawClass* obj = reinterpret_cast<RawClass*>( | 476 RawClass* obj = reinterpret_cast<RawClass*>( |
477 AllocateUninitialized(cls_, Class::InstanceSize())); | 477 AllocateUninitialized(cls_, Class::InstanceSize())); |
478 Instance fake; | 478 Instance fake; |
479 obj->ptr()->handle_vtable_ = fake.vtable(); | 479 obj->ptr()->handle_vtable_ = fake.vtable(); |
480 cls_ = obj; | 480 cls_ = obj; |
481 cls_.set_id(kIllegalCid); | 481 cls_.set_id(kIllegalCid); |
482 isolate()->class_table()->Register(cls_); | 482 isolate()->RegisterClass(cls_); |
483 return cls_.raw(); | 483 return cls_.raw(); |
484 } | 484 } |
485 | 485 |
486 | 486 |
487 RawMint* SnapshotReader::NewMint(int64_t value) { | 487 RawMint* SnapshotReader::NewMint(int64_t value) { |
488 ASSERT(kind_ == Snapshot::kFull); | 488 ASSERT(kind_ == Snapshot::kFull); |
489 ASSERT(isolate()->no_gc_scope_depth() != 0); | 489 ASSERT(isolate()->no_gc_scope_depth() != 0); |
490 cls_ = object_store()->mint_class(); | 490 cls_ = object_store()->mint_class(); |
491 RawMint* obj = reinterpret_cast<RawMint*>( | 491 RawMint* obj = reinterpret_cast<RawMint*>( |
492 AllocateUninitialized(cls_, Mint::InstanceSize())); | 492 AllocateUninitialized(cls_, Mint::InstanceSize())); |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1465 UnmarkAll(); | 1465 UnmarkAll(); |
1466 isolate->set_long_jump_base(base); | 1466 isolate->set_long_jump_base(base); |
1467 } else { | 1467 } else { |
1468 isolate->set_long_jump_base(base); | 1468 isolate->set_long_jump_base(base); |
1469 ThrowException(exception_type(), exception_msg()); | 1469 ThrowException(exception_type(), exception_msg()); |
1470 } | 1470 } |
1471 } | 1471 } |
1472 | 1472 |
1473 | 1473 |
1474 } // namespace dart | 1474 } // namespace dart |
OLD | NEW |