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

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

Issue 12089049: Do not add smis to the store buffer when cloning objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
« runtime/vm/object.cc ('K') | « runtime/vm/object.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/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 class ClassIdTag : public BitField<intptr_t, 246 class ClassIdTag : public BitField<intptr_t,
247 kClassIdTagBit, 247 kClassIdTagBit,
248 kClassIdTagSize> {}; // NOLINT 248 kClassIdTagSize> {}; // NOLINT
249 249
250 bool IsHeapObject() const { 250 bool IsHeapObject() const {
251 uword value = reinterpret_cast<uword>(this); 251 uword value = reinterpret_cast<uword>(this);
252 return (value & kSmiTagMask) == kHeapObjectTag; 252 return (value & kSmiTagMask) == kHeapObjectTag;
253 } 253 }
254 254
255 bool IsNewObject() const { 255 bool IsNewObject() const {
256 ASSERT(IsHeapObject());
256 uword addr = reinterpret_cast<uword>(this); 257 uword addr = reinterpret_cast<uword>(this);
257 return (addr & kNewObjectAlignmentOffset) == kNewObjectAlignmentOffset; 258 return (addr & kNewObjectAlignmentOffset) == kNewObjectAlignmentOffset;
258 } 259 }
259 bool IsOldObject() const { 260 bool IsOldObject() const {
261 ASSERT(IsHeapObject());
260 uword addr = reinterpret_cast<uword>(this); 262 uword addr = reinterpret_cast<uword>(this);
261 return (addr & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset; 263 return (addr & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset;
262 } 264 }
263 bool IsVMHeapObject() const; 265 bool IsVMHeapObject() const;
264 266
265 // Support for GC marking bit. 267 // Support for GC marking bit.
266 bool IsMarked() const { 268 bool IsMarked() const {
267 return MarkBit::decode(ptr()->tags_); 269 return MarkBit::decode(ptr()->tags_);
268 } 270 }
269 void SetMarkBit() { 271 void SetMarkBit() {
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 && 1707 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 &&
1706 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 && 1708 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 &&
1707 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 && 1709 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 &&
1708 kStacktraceCid == kExternalInt8ArrayCid + 11); 1710 kStacktraceCid == kExternalInt8ArrayCid + 11);
1709 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); 1711 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid);
1710 } 1712 }
1711 1713
1712 } // namespace dart 1714 } // namespace dart
1713 1715
1714 #endif // VM_RAW_OBJECT_H_ 1716 #endif // VM_RAW_OBJECT_H_
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698