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

Side by Side Diff: vm/raw_object.h

Issue 11722026: Do not emit pointer information for embedded singleton VM Isolate objects while generating code. Th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 11 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
« vm/object.h ('K') | « vm/object.h ('k') | vm/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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 253 }
254 254
255 bool IsNewObject() const { 255 bool IsNewObject() const {
256 uword addr = reinterpret_cast<uword>(this); 256 uword addr = reinterpret_cast<uword>(this);
257 return (addr & kNewObjectAlignmentOffset) == kNewObjectAlignmentOffset; 257 return (addr & kNewObjectAlignmentOffset) == kNewObjectAlignmentOffset;
258 } 258 }
259 bool IsOldObject() const { 259 bool IsOldObject() const {
260 uword addr = reinterpret_cast<uword>(this); 260 uword addr = reinterpret_cast<uword>(this);
261 return (addr & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset; 261 return (addr & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset;
262 } 262 }
263 bool IsVMHeapObject() const {
264 // TODO(asiva): Need a better way to represent VM heap objects, for
265 // now we use the premarked property for identifying objects in the
266 // VM heap.
267 ASSERT(IsHeapObject());
268 return IsMarked();
269 }
263 270
264 // Support for GC marking bit. 271 // Support for GC marking bit.
265 bool IsMarked() const { 272 bool IsMarked() const {
266 return MarkBit::decode(ptr()->tags_); 273 return MarkBit::decode(ptr()->tags_);
267 } 274 }
268 void SetMarkBit() { 275 void SetMarkBit() {
269 ASSERT(!IsMarked()); 276 ASSERT(!IsMarked());
270 uword tags = ptr()->tags_; 277 uword tags = ptr()->tags_;
271 ptr()->tags_ = MarkBit::update(true, tags); 278 ptr()->tags_ = MarkBit::update(true, tags);
272 } 279 }
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 && 1692 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 &&
1686 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 && 1693 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 &&
1687 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 && 1694 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 &&
1688 kStacktraceCid == kExternalInt8ArrayCid + 11); 1695 kStacktraceCid == kExternalInt8ArrayCid + 11);
1689 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); 1696 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid);
1690 } 1697 }
1691 1698
1692 } // namespace dart 1699 } // namespace dart
1693 1700
1694 #endif // VM_RAW_OBJECT_H_ 1701 #endif // VM_RAW_OBJECT_H_
OLDNEW
« vm/object.h ('K') | « vm/object.h ('k') | vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698