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

Side by Side Diff: vm/raw_object.h

Issue 8827016: Add a flags field to RawObject so that we can tag objects with certain (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years 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 | « vm/object_test.cc ('k') | vm/stub_code_ia32.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "vm/assert.h" 8 #include "vm/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/snapshot.h" 10 #include "vm/snapshot.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 kNotMarked = 1, // Tagged pointer. 189 kNotMarked = 1, // Tagged pointer.
190 kMarked = 3, // Tagged pointer and forwarding bit set. 190 kMarked = 3, // Tagged pointer and forwarding bit set.
191 }; 191 };
192 192
193 RawObject* ptr() const { 193 RawObject* ptr() const {
194 ASSERT(IsHeapObject()); 194 ASSERT(IsHeapObject());
195 return reinterpret_cast<RawObject*>( 195 return reinterpret_cast<RawObject*>(
196 reinterpret_cast<uword>(this) - kHeapObjectTag); 196 reinterpret_cast<uword>(this) - kHeapObjectTag);
197 } 197 }
198 198
199 intptr_t tags_; // Various object tags (bits).
200
199 friend class Object; 201 friend class Object;
200 friend class Array; 202 friend class Array;
201 friend class SnapshotWriter; 203 friend class SnapshotWriter;
202 friend class SnapshotReader; 204 friend class SnapshotReader;
203 friend class MarkingVisitor; 205 friend class MarkingVisitor;
204 206
205 DISALLOW_ALLOCATION(); 207 DISALLOW_ALLOCATION();
206 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject); 208 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject);
207 }; 209 };
208 210
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 intptr_t type_; // Uninitialized, simple or complex. 858 intptr_t type_; // Uninitialized, simple or complex.
857 intptr_t flags_; // Represents global/local, case insensitive, multiline. 859 intptr_t flags_; // Represents global/local, case insensitive, multiline.
858 860
859 // Variable length data follows here. 861 // Variable length data follows here.
860 uint8_t data_[0]; 862 uint8_t data_[0];
861 }; 863 };
862 864
863 } // namespace dart 865 } // namespace dart
864 866
865 #endif // VM_RAW_OBJECT_H_ 867 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « vm/object_test.cc ('k') | vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698