Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(704)

Side by Side Diff: runtime/vm/raw_object.h

Issue 2902313004: CoreJIT snapshots without training. (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_RAW_OBJECT_H_ 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_
6 #define RUNTIME_VM_RAW_OBJECT_H_ 6 #define RUNTIME_VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 RawType* canonical_type_; // Canonical type for this class. 670 RawType* canonical_type_; // Canonical type for this class.
671 RawArray* invocation_dispatcher_cache_; // Cache for dispatcher functions. 671 RawArray* invocation_dispatcher_cache_; // Cache for dispatcher functions.
672 RawCode* allocation_stub_; // Stub code for allocation of instances. 672 RawCode* allocation_stub_; // Stub code for allocation of instances.
673 RawGrowableObjectArray* direct_subclasses_; // Array of Class. 673 RawGrowableObjectArray* direct_subclasses_; // Array of Class.
674 RawArray* dependent_code_; // CHA optimized codes. 674 RawArray* dependent_code_; // CHA optimized codes.
675 RawObject** to() { 675 RawObject** to() {
676 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); 676 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_);
677 } 677 }
678 RawObject** to_snapshot(Snapshot::Kind kind) { 678 RawObject** to_snapshot(Snapshot::Kind kind) {
679 switch (kind) { 679 switch (kind) {
680 case Snapshot::kCore: 680 case Snapshot::kFull:
681 case Snapshot::kScript: 681 case Snapshot::kScript:
682 case Snapshot::kAppJIT: 682 case Snapshot::kFullJIT:
683 case Snapshot::kAppAOT: 683 case Snapshot::kFullAOT:
684 return reinterpret_cast<RawObject**>(&ptr()->direct_subclasses_); 684 return reinterpret_cast<RawObject**>(&ptr()->direct_subclasses_);
685 case Snapshot::kMessage: 685 case Snapshot::kMessage:
686 case Snapshot::kNone: 686 case Snapshot::kNone:
687 case Snapshot::kInvalid: 687 case Snapshot::kInvalid:
688 break; 688 break;
689 } 689 }
690 UNREACHABLE(); 690 UNREACHABLE();
691 return NULL; 691 return NULL;
692 } 692 }
693 693
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 // restore the value back to the original initial value. 929 // restore the value back to the original initial value.
930 RawInstance* saved_value_; // Saved initial value - static fields. 930 RawInstance* saved_value_; // Saved initial value - static fields.
931 } initializer_; 931 } initializer_;
932 RawSmi* guarded_list_length_; 932 RawSmi* guarded_list_length_;
933 RawArray* dependent_code_; 933 RawArray* dependent_code_;
934 RawObject** to() { 934 RawObject** to() {
935 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); 935 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_);
936 } 936 }
937 RawObject** to_snapshot(Snapshot::Kind kind) { 937 RawObject** to_snapshot(Snapshot::Kind kind) {
938 switch (kind) { 938 switch (kind) {
939 case Snapshot::kCore: 939 case Snapshot::kFull:
940 case Snapshot::kScript: 940 case Snapshot::kScript:
941 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_); 941 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_);
942 case Snapshot::kAppJIT: 942 case Snapshot::kFullJIT:
943 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); 943 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_);
944 case Snapshot::kAppAOT: 944 case Snapshot::kFullAOT:
945 return reinterpret_cast<RawObject**>(&ptr()->initializer_); 945 return reinterpret_cast<RawObject**>(&ptr()->initializer_);
946 case Snapshot::kMessage: 946 case Snapshot::kMessage:
947 case Snapshot::kNone: 947 case Snapshot::kNone:
948 case Snapshot::kInvalid: 948 case Snapshot::kInvalid:
949 break; 949 break;
950 } 950 }
951 UNREACHABLE(); 951 UNREACHABLE();
952 return NULL; 952 return NULL;
953 } 953 }
954 954
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 RawArray* debug_positions_; 1018 RawArray* debug_positions_;
1019 RawArray* yield_positions_; 1019 RawArray* yield_positions_;
1020 RawTypedData* kernel_string_offsets_; 1020 RawTypedData* kernel_string_offsets_;
1021 RawTypedData* kernel_string_data_; 1021 RawTypedData* kernel_string_data_;
1022 RawTypedData* kernel_canonical_names_; 1022 RawTypedData* kernel_canonical_names_;
1023 RawTokenStream* tokens_; 1023 RawTokenStream* tokens_;
1024 RawString* source_; 1024 RawString* source_;
1025 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->source_); } 1025 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->source_); }
1026 RawObject** to_snapshot(Snapshot::Kind kind) { 1026 RawObject** to_snapshot(Snapshot::Kind kind) {
1027 switch (kind) { 1027 switch (kind) {
1028 case Snapshot::kAppAOT: 1028 case Snapshot::kFullAOT:
1029 return reinterpret_cast<RawObject**>(&ptr()->url_); 1029 return reinterpret_cast<RawObject**>(&ptr()->url_);
1030 case Snapshot::kCore: 1030 case Snapshot::kFull:
1031 case Snapshot::kAppJIT: 1031 case Snapshot::kFullJIT:
1032 case Snapshot::kScript: 1032 case Snapshot::kScript:
1033 return reinterpret_cast<RawObject**>(&ptr()->tokens_); 1033 return reinterpret_cast<RawObject**>(&ptr()->tokens_);
1034 case Snapshot::kMessage: 1034 case Snapshot::kMessage:
1035 case Snapshot::kNone: 1035 case Snapshot::kNone:
1036 case Snapshot::kInvalid: 1036 case Snapshot::kInvalid:
1037 break; 1037 break;
1038 } 1038 }
1039 UNREACHABLE(); 1039 UNREACHABLE();
1040 return NULL; 1040 return NULL;
1041 } 1041 }
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 RAW_HEAP_OBJECT_IMPLEMENTATION(ICData); 1511 RAW_HEAP_OBJECT_IMPLEMENTATION(ICData);
1512 1512
1513 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->ic_data_); } 1513 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->ic_data_); }
1514 RawArray* ic_data_; // Contains class-ids, target and count. 1514 RawArray* ic_data_; // Contains class-ids, target and count.
1515 RawString* target_name_; // Name of target function. 1515 RawString* target_name_; // Name of target function.
1516 RawArray* args_descriptor_; // Arguments descriptor. 1516 RawArray* args_descriptor_; // Arguments descriptor.
1517 RawObject* owner_; // Parent/calling function or original IC of cloned IC. 1517 RawObject* owner_; // Parent/calling function or original IC of cloned IC.
1518 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->owner_); } 1518 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->owner_); }
1519 RawObject** to_snapshot(Snapshot::Kind kind) { 1519 RawObject** to_snapshot(Snapshot::Kind kind) {
1520 switch (kind) { 1520 switch (kind) {
1521 case Snapshot::kAppAOT: 1521 case Snapshot::kFullAOT:
1522 return reinterpret_cast<RawObject**>(&ptr()->args_descriptor_); 1522 return reinterpret_cast<RawObject**>(&ptr()->args_descriptor_);
1523 case Snapshot::kCore: 1523 case Snapshot::kFull:
1524 case Snapshot::kScript: 1524 case Snapshot::kScript:
1525 case Snapshot::kAppJIT: 1525 case Snapshot::kFullJIT:
1526 return to(); 1526 return to();
1527 case Snapshot::kMessage: 1527 case Snapshot::kMessage:
1528 case Snapshot::kNone: 1528 case Snapshot::kNone:
1529 case Snapshot::kInvalid: 1529 case Snapshot::kInvalid:
1530 break; 1530 break;
1531 } 1531 }
1532 UNREACHABLE(); 1532 UNREACHABLE();
1533 return NULL; 1533 return NULL;
1534 } 1534 }
1535 NOT_IN_PRECOMPILED(int32_t deopt_id_); 1535 NOT_IN_PRECOMPILED(int32_t deopt_id_);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 RawString* name_; // Library prefix name. 1632 RawString* name_; // Library prefix name.
1633 RawLibrary* importer_; // Library which declares this prefix. 1633 RawLibrary* importer_; // Library which declares this prefix.
1634 RawArray* imports_; // Libraries imported with this prefix. 1634 RawArray* imports_; // Libraries imported with this prefix.
1635 RawArray* dependent_code_; // Code that refers to deferred, unloaded 1635 RawArray* dependent_code_; // Code that refers to deferred, unloaded
1636 // library prefix. 1636 // library prefix.
1637 RawObject** to() { 1637 RawObject** to() {
1638 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); 1638 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_);
1639 } 1639 }
1640 RawObject** to_snapshot(Snapshot::Kind kind) { 1640 RawObject** to_snapshot(Snapshot::Kind kind) {
1641 switch (kind) { 1641 switch (kind) {
1642 case Snapshot::kCore: 1642 case Snapshot::kFull:
1643 case Snapshot::kScript: 1643 case Snapshot::kScript:
1644 case Snapshot::kAppJIT: 1644 case Snapshot::kFullJIT:
1645 return reinterpret_cast<RawObject**>(&ptr()->imports_); 1645 return reinterpret_cast<RawObject**>(&ptr()->imports_);
1646 case Snapshot::kAppAOT: 1646 case Snapshot::kFullAOT:
1647 return reinterpret_cast<RawObject**>(&ptr()->importer_); 1647 return reinterpret_cast<RawObject**>(&ptr()->importer_);
1648 case Snapshot::kMessage: 1648 case Snapshot::kMessage:
1649 case Snapshot::kNone: 1649 case Snapshot::kNone:
1650 case Snapshot::kInvalid: 1650 case Snapshot::kInvalid:
1651 break; 1651 break;
1652 } 1652 }
1653 UNREACHABLE(); 1653 UNREACHABLE();
1654 return NULL; 1654 return NULL;
1655 } 1655 }
1656 uint16_t num_imports_; // Number of library entries in libraries_. 1656 uint16_t num_imports_; // Number of library entries in libraries_.
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
2451 kTypedDataInt8ArrayViewCid + 15); 2451 kTypedDataInt8ArrayViewCid + 15);
2452 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2452 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2453 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2453 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2454 return (kNullCid - kTypedDataInt8ArrayCid); 2454 return (kNullCid - kTypedDataInt8ArrayCid);
2455 } 2455 }
2456 2456
2457 2457
2458 } // namespace dart 2458 } // namespace dart
2459 2459
2460 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2460 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698