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

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

Issue 22915008: Tests for GuardField length check along with bug fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | 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/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 class RawField : public RawObject { 673 class RawField : public RawObject {
674 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); 674 RAW_HEAP_OBJECT_IMPLEMENTATION(Field);
675 675
676 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 676 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
677 RawString* name_; 677 RawString* name_;
678 RawObject* owner_; // Class or patch class or mixin class 678 RawObject* owner_; // Class or patch class or mixin class
679 // where this field is defined. 679 // where this field is defined.
680 RawAbstractType* type_; 680 RawAbstractType* type_;
681 RawInstance* value_; // Offset in words for instance and value for static. 681 RawInstance* value_; // Offset in words for instance and value for static.
682 RawArray* dependent_code_; 682 RawArray* dependent_code_;
683 RawSmi* guarded_list_length_;
683 RawObject** to() { 684 RawObject** to() {
684 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); 685 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_);
685 } 686 }
686 687
687 intptr_t token_pos_; 688 intptr_t token_pos_;
688 intptr_t guarded_cid_; 689 intptr_t guarded_cid_;
689 intptr_t is_nullable_; // kNullCid if field can contain null value and 690 intptr_t is_nullable_; // kNullCid if field can contain null value and
690 // any other value otherwise. 691 // any other value otherwise.
691 intptr_t guarded_list_length_;
692 uint8_t kind_bits_; // static, final, const, has initializer. 692 uint8_t kind_bits_; // static, final, const, has initializer.
693 }; 693 };
694 694
695 695
696 class RawLiteralToken : public RawObject { 696 class RawLiteralToken : public RawObject {
697 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); 697 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken);
698 698
699 RawObject** from() { 699 RawObject** from() {
700 return reinterpret_cast<RawObject**>(&ptr()->literal_); 700 return reinterpret_cast<RawObject**>(&ptr()->literal_);
701 } 701 }
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 // Make sure this is updated when new TypedData types are added. 1712 // Make sure this is updated when new TypedData types are added.
1713 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); 1713 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12);
1714 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); 1714 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13);
1715 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); 1715 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12);
1716 return (kNullCid - kTypedDataInt8ArrayCid); 1716 return (kNullCid - kTypedDataInt8ArrayCid);
1717 } 1717 }
1718 1718
1719 } // namespace dart 1719 } // namespace dart
1720 1720
1721 #endif // VM_RAW_OBJECT_H_ 1721 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698