OLD | NEW |
---|---|
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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
370 void SetRememberedBit() { | 370 void SetRememberedBit() { |
371 ASSERT(!IsRemembered()); | 371 ASSERT(!IsRemembered()); |
372 uword tags = ptr()->tags_; | 372 uword tags = ptr()->tags_; |
373 ptr()->tags_ = RememberedBit::update(true, tags); | 373 ptr()->tags_ = RememberedBit::update(true, tags); |
374 } | 374 } |
375 void ClearRememberedBit() { | 375 void ClearRememberedBit() { |
376 uword tags = ptr()->tags_; | 376 uword tags = ptr()->tags_; |
377 ptr()->tags_ = RememberedBit::update(false, tags); | 377 ptr()->tags_ = RememberedBit::update(false, tags); |
378 } | 378 } |
379 | 379 |
380 bool IsNullOrPseudoNull() { | |
381 return (!IsHeapObject() && (GetClassId() == kNullCid)); | |
382 } | |
turnidge
2014/08/27 16:13:56
I missed where this is used... can you tell me?
rmacnak
2014/08/27 18:09:59
Was used in guard for values not to insert in the
| |
380 bool IsDartInstance() { | 383 bool IsDartInstance() { |
381 return (!IsHeapObject() || (GetClassId() >= kInstanceCid)); | 384 return (!IsHeapObject() || (GetClassId() >= kInstanceCid)); |
382 } | 385 } |
383 bool IsFreeListElement() { | 386 bool IsFreeListElement() { |
384 return ((GetClassId() == kFreeListElement)); | 387 return ((GetClassId() == kFreeListElement)); |
385 } | 388 } |
386 | 389 |
387 intptr_t Size() const { | 390 intptr_t Size() const { |
388 uword tags = ptr()->tags_; | 391 uword tags = ptr()->tags_; |
389 intptr_t result = SizeTag::decode(tags); | 392 intptr_t result = SizeTag::decode(tags); |
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1997 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2000 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
1998 kTypedDataInt8ArrayViewCid + 15); | 2001 kTypedDataInt8ArrayViewCid + 15); |
1999 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2002 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2000 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2003 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2001 return (kNullCid - kTypedDataInt8ArrayCid); | 2004 return (kNullCid - kTypedDataInt8ArrayCid); |
2002 } | 2005 } |
2003 | 2006 |
2004 } // namespace dart | 2007 } // namespace dart |
2005 | 2008 |
2006 #endif // VM_RAW_OBJECT_H_ | 2009 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |