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

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

Issue 12529008: Collect type feedback for fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 657
658 class RawField : public RawObject { 658 class RawField : public RawObject {
659 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); 659 RAW_HEAP_OBJECT_IMPLEMENTATION(Field);
660 660
661 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 661 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
662 RawString* name_; 662 RawString* name_;
663 RawObject* owner_; // Class or patch class or mixin class 663 RawObject* owner_; // Class or patch class or mixin class
664 // where this field is defined. 664 // where this field is defined.
665 RawAbstractType* type_; 665 RawAbstractType* type_;
666 RawInstance* value_; // Offset in words for instance and value for static. 666 RawInstance* value_; // Offset in words for instance and value for static.
667 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->value_); } 667 RawArray* dependent_code_;
668 RawObject** to() {
669 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_);
670 }
668 671
669 intptr_t token_pos_; 672 intptr_t token_pos_;
673 intptr_t guarded_cid_;
674 intptr_t is_nullable_; // kNullCid if field can contain null value and
675 // kIllegalCid otherwise.
670 uint8_t kind_bits_; // static, final, const, has initializer. 676 uint8_t kind_bits_; // static, final, const, has initializer.
671 }; 677 };
672 678
673 679
674 class RawLiteralToken : public RawObject { 680 class RawLiteralToken : public RawObject {
675 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); 681 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken);
676 682
677 RawObject** from() { 683 RawObject** from() {
678 return reinterpret_cast<RawObject**>(&ptr()->literal_); 684 return reinterpret_cast<RawObject**>(&ptr()->literal_);
679 } 685 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 RawInstructions* instructions_; 808 RawInstructions* instructions_;
803 RawFunction* function_; 809 RawFunction* function_;
804 RawExceptionHandlers* exception_handlers_; 810 RawExceptionHandlers* exception_handlers_;
805 RawPcDescriptors* pc_descriptors_; 811 RawPcDescriptors* pc_descriptors_;
806 RawArray* deopt_info_array_; 812 RawArray* deopt_info_array_;
807 RawArray* object_table_; 813 RawArray* object_table_;
808 RawArray* static_calls_target_table_; // (code-offset, function, code). 814 RawArray* static_calls_target_table_; // (code-offset, function, code).
809 RawArray* stackmaps_; 815 RawArray* stackmaps_;
810 RawLocalVarDescriptors* var_descriptors_; 816 RawLocalVarDescriptors* var_descriptors_;
811 RawArray* comments_; 817 RawArray* comments_;
818 RawArray* guarded_fields_;
812 RawObject** to() { 819 RawObject** to() {
813 return reinterpret_cast<RawObject**>(&ptr()->comments_); 820 return reinterpret_cast<RawObject**>(&ptr()->guarded_fields_);
814 } 821 }
815 822
816 intptr_t pointer_offsets_length_; 823 intptr_t pointer_offsets_length_;
817 // These fields cannot be boolean because of alignment issues on x64 824 // These fields cannot be boolean because of alignment issues on x64
818 // architectures. 825 // architectures.
819 intptr_t is_optimized_; 826 intptr_t is_optimized_;
820 // If true, the embedded object pointers will be visited during GC. 827 // If true, the embedded object pointers will be visited during GC.
821 intptr_t is_alive_; 828 intptr_t is_alive_;
822 829
823 // Variable length data follows here. 830 // Variable length data follows here.
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 inline intptr_t RawObject::NumberOfTypedDataClasses() { 1882 inline intptr_t RawObject::NumberOfTypedDataClasses() {
1876 // Make sure this is updated when new TypedData types are added. 1883 // Make sure this is updated when new TypedData types are added.
1877 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayCid + 11); 1884 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayCid + 11);
1878 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 11); 1885 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 11);
1879 return (kNullCid - kTypedDataInt8ArrayCid); 1886 return (kNullCid - kTypedDataInt8ArrayCid);
1880 } 1887 }
1881 1888
1882 } // namespace dart 1889 } // namespace dart
1883 1890
1884 #endif // VM_RAW_OBJECT_H_ 1891 #endif // VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698