| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 RawGrowableObjectArray* token_objects() const { return token_objects_; } | 398 RawGrowableObjectArray* token_objects() const { return token_objects_; } |
| 399 void set_token_objects(const GrowableObjectArray& value) { | 399 void set_token_objects(const GrowableObjectArray& value) { |
| 400 token_objects_ = value.raw(); | 400 token_objects_ = value.raw(); |
| 401 } | 401 } |
| 402 | 402 |
| 403 RawArray* token_objects_map() const { return token_objects_map_; } | 403 RawArray* token_objects_map() const { return token_objects_map_; } |
| 404 void set_token_objects_map(const Array& value) { | 404 void set_token_objects_map(const Array& value) { |
| 405 token_objects_map_ = value.raw(); | 405 token_objects_map_ = value.raw(); |
| 406 } | 406 } |
| 407 | 407 |
| 408 RawArray* obfuscation_map() const { return obfuscation_map_; } |
| 409 void set_obfuscation_map(const Array& value) { |
| 410 obfuscation_map_ = value.raw(); |
| 411 } |
| 412 |
| 408 RawGrowableObjectArray* megamorphic_cache_table() const { | 413 RawGrowableObjectArray* megamorphic_cache_table() const { |
| 409 return megamorphic_cache_table_; | 414 return megamorphic_cache_table_; |
| 410 } | 415 } |
| 411 void set_megamorphic_cache_table(const GrowableObjectArray& value) { | 416 void set_megamorphic_cache_table(const GrowableObjectArray& value) { |
| 412 megamorphic_cache_table_ = value.raw(); | 417 megamorphic_cache_table_ = value.raw(); |
| 413 } | 418 } |
| 414 RawCode* megamorphic_miss_code() const { return megamorphic_miss_code_; } | 419 RawCode* megamorphic_miss_code() const { return megamorphic_miss_code_; } |
| 415 RawFunction* megamorphic_miss_function() const { | 420 RawFunction* megamorphic_miss_function() const { |
| 416 return megamorphic_miss_function_; | 421 return megamorphic_miss_function_; |
| 417 } | 422 } |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 V(RawFunction*, async_star_move_next_helper_) \ | 582 V(RawFunction*, async_star_move_next_helper_) \ |
| 578 V(RawFunction*, complete_on_async_return_) \ | 583 V(RawFunction*, complete_on_async_return_) \ |
| 579 V(RawClass*, async_star_stream_controller_) \ | 584 V(RawClass*, async_star_stream_controller_) \ |
| 580 V(RawArray*, library_load_error_table_) \ | 585 V(RawArray*, library_load_error_table_) \ |
| 581 V(RawArray*, unique_dynamic_targets_) \ | 586 V(RawArray*, unique_dynamic_targets_) \ |
| 582 V(RawGrowableObjectArray*, token_objects_) \ | 587 V(RawGrowableObjectArray*, token_objects_) \ |
| 583 V(RawArray*, token_objects_map_) \ | 588 V(RawArray*, token_objects_map_) \ |
| 584 V(RawGrowableObjectArray*, megamorphic_cache_table_) \ | 589 V(RawGrowableObjectArray*, megamorphic_cache_table_) \ |
| 585 V(RawCode*, megamorphic_miss_code_) \ | 590 V(RawCode*, megamorphic_miss_code_) \ |
| 586 V(RawFunction*, megamorphic_miss_function_) \ | 591 V(RawFunction*, megamorphic_miss_function_) \ |
| 592 V(RawArray*, obfuscation_map_) \ |
| 587 // Please remember the last entry must be referred in the 'to' function below. | 593 // Please remember the last entry must be referred in the 'to' function below. |
| 588 | 594 |
| 589 RawObject** from() { return reinterpret_cast<RawObject**>(&object_class_); } | 595 RawObject** from() { return reinterpret_cast<RawObject**>(&object_class_); } |
| 590 #define DECLARE_OBJECT_STORE_FIELD(type, name) type name; | 596 #define DECLARE_OBJECT_STORE_FIELD(type, name) type name; |
| 591 OBJECT_STORE_FIELD_LIST(DECLARE_OBJECT_STORE_FIELD) | 597 OBJECT_STORE_FIELD_LIST(DECLARE_OBJECT_STORE_FIELD) |
| 592 #undef DECLARE_OBJECT_STORE_FIELD | 598 #undef DECLARE_OBJECT_STORE_FIELD |
| 593 RawObject** to() { | 599 RawObject** to() { return reinterpret_cast<RawObject**>(&obfuscation_map_); } |
| 594 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_); | |
| 595 } | |
| 596 RawObject** to_snapshot(Snapshot::Kind kind) { | 600 RawObject** to_snapshot(Snapshot::Kind kind) { |
| 597 switch (kind) { | 601 switch (kind) { |
| 598 case Snapshot::kFull: | 602 case Snapshot::kFull: |
| 599 return reinterpret_cast<RawObject**>(&library_load_error_table_); | 603 return reinterpret_cast<RawObject**>(&library_load_error_table_); |
| 600 case Snapshot::kFullJIT: | 604 case Snapshot::kFullJIT: |
| 601 case Snapshot::kFullAOT: | 605 case Snapshot::kFullAOT: |
| 602 return to(); | 606 return reinterpret_cast<RawObject**>(&megamorphic_miss_function_); |
| 603 case Snapshot::kScript: | 607 case Snapshot::kScript: |
| 604 case Snapshot::kMessage: | 608 case Snapshot::kMessage: |
| 605 case Snapshot::kNone: | 609 case Snapshot::kNone: |
| 606 case Snapshot::kInvalid: | 610 case Snapshot::kInvalid: |
| 607 break; | 611 break; |
| 608 } | 612 } |
| 609 UNREACHABLE(); | 613 UNREACHABLE(); |
| 610 return NULL; | 614 return NULL; |
| 611 } | 615 } |
| 612 | 616 |
| 613 friend class Serializer; | 617 friend class Serializer; |
| 614 friend class Deserializer; | 618 friend class Deserializer; |
| 615 | 619 |
| 616 DISALLOW_COPY_AND_ASSIGN(ObjectStore); | 620 DISALLOW_COPY_AND_ASSIGN(ObjectStore); |
| 617 }; | 621 }; |
| 618 | 622 |
| 619 } // namespace dart | 623 } // namespace dart |
| 620 | 624 |
| 621 #endif // RUNTIME_VM_OBJECT_STORE_H_ | 625 #endif // RUNTIME_VM_OBJECT_STORE_H_ |
| OLD | NEW |