| 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 #ifndef RUNTIME_VM_OBJECT_STORE_H_ | 5 #ifndef RUNTIME_VM_OBJECT_STORE_H_ |
| 6 #define RUNTIME_VM_OBJECT_STORE_H_ | 6 #define RUNTIME_VM_OBJECT_STORE_H_ |
| 7 | 7 |
| 8 #include "vm/object.h" | 8 #include "vm/object.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 | 597 |
| 598 RawObject** from() { return reinterpret_cast<RawObject**>(&object_class_); } | 598 RawObject** from() { return reinterpret_cast<RawObject**>(&object_class_); } |
| 599 #define DECLARE_OBJECT_STORE_FIELD(type, name) type name; | 599 #define DECLARE_OBJECT_STORE_FIELD(type, name) type name; |
| 600 OBJECT_STORE_FIELD_LIST(DECLARE_OBJECT_STORE_FIELD) | 600 OBJECT_STORE_FIELD_LIST(DECLARE_OBJECT_STORE_FIELD) |
| 601 #undef DECLARE_OBJECT_STORE_FIELD | 601 #undef DECLARE_OBJECT_STORE_FIELD |
| 602 RawObject** to() { | 602 RawObject** to() { |
| 603 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_); | 603 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_); |
| 604 } | 604 } |
| 605 RawObject** to_snapshot(Snapshot::Kind kind) { | 605 RawObject** to_snapshot(Snapshot::Kind kind) { |
| 606 switch (kind) { | 606 switch (kind) { |
| 607 case Snapshot::kCore: | 607 case Snapshot::kFull: |
| 608 return reinterpret_cast<RawObject**>(&library_load_error_table_); | 608 return reinterpret_cast<RawObject**>(&library_load_error_table_); |
| 609 case Snapshot::kAppJIT: | 609 case Snapshot::kFullJIT: |
| 610 case Snapshot::kAppAOT: | 610 case Snapshot::kFullAOT: |
| 611 return to(); | 611 return to(); |
| 612 case Snapshot::kScript: | 612 case Snapshot::kScript: |
| 613 case Snapshot::kMessage: | 613 case Snapshot::kMessage: |
| 614 case Snapshot::kNone: | 614 case Snapshot::kNone: |
| 615 case Snapshot::kInvalid: | 615 case Snapshot::kInvalid: |
| 616 break; | 616 break; |
| 617 } | 617 } |
| 618 UNREACHABLE(); | 618 UNREACHABLE(); |
| 619 return NULL; | 619 return NULL; |
| 620 } | 620 } |
| 621 | 621 |
| 622 friend class Serializer; | 622 friend class Serializer; |
| 623 friend class Deserializer; | 623 friend class Deserializer; |
| 624 | 624 |
| 625 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 625 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
| 626 }; | 626 }; |
| 627 | 627 |
| 628 } // namespace dart | 628 } // namespace dart |
| 629 | 629 |
| 630 #endif // RUNTIME_VM_OBJECT_STORE_H_ | 630 #endif // RUNTIME_VM_OBJECT_STORE_H_ |
| OLD | NEW |