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

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

Issue 1176703002: Make guard_cid and nullable_cid half words. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 RawObject* owner_; // Class or patch class or mixin class 807 RawObject* owner_; // Class or patch class or mixin class
808 // where this field is defined. 808 // where this field is defined.
809 RawAbstractType* type_; 809 RawAbstractType* type_;
810 RawInstance* value_; // Offset in words for instance and value for static. 810 RawInstance* value_; // Offset in words for instance and value for static.
811 RawArray* dependent_code_; 811 RawArray* dependent_code_;
812 RawSmi* guarded_list_length_; 812 RawSmi* guarded_list_length_;
813 RawObject** to() { 813 RawObject** to() {
814 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_); 814 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_);
815 } 815 }
816 816
817 // TODO(rmacnak): Make guarded_cid and is_nullable be cid_t.
818 int32_t token_pos_; 817 int32_t token_pos_;
819 int32_t guarded_cid_; 818 classid_t guarded_cid_;
820 int32_t is_nullable_; // kNullCid if field can contain null value and 819 classid_t is_nullable_; // kNullCid if field can contain null value and
821 // any other value otherwise. 820 // any other value otherwise.
822 // Offset to the guarded length field inside an instance of class matching 821 // Offset to the guarded length field inside an instance of class matching
823 // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code 822 // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code
824 // generated on platforms with weak addressing modes (ARM, MIPS). 823 // generated on platforms with weak addressing modes (ARM, MIPS).
825 int8_t guarded_list_length_in_object_offset_; 824 int8_t guarded_list_length_in_object_offset_;
826 825
827 uint8_t kind_bits_; // static, final, const, has initializer. 826 uint8_t kind_bits_; // static, final, const, has initializer.
828 }; 827 };
829 828
830 829
831 class RawLiteralToken : public RawObject { 830 class RawLiteralToken : public RawObject {
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2163 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2162 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2164 kTypedDataInt8ArrayViewCid + 15); 2163 kTypedDataInt8ArrayViewCid + 15);
2165 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2164 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2166 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2165 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2167 return (kNullCid - kTypedDataInt8ArrayCid); 2166 return (kNullCid - kTypedDataInt8ArrayCid);
2168 } 2167 }
2169 2168
2170 } // namespace dart 2169 } // namespace dart
2171 2170
2172 #endif // VM_RAW_OBJECT_H_ 2171 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698