| 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_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ | 
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ | 
| 7 | 7 | 
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" | 
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" | 
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" | 
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 255   RawObject* raw() const { return raw_; } | 255   RawObject* raw() const { return raw_; } | 
| 256   void operator=(RawObject* value) { | 256   void operator=(RawObject* value) { | 
| 257     initializeHandle(this, value); | 257     initializeHandle(this, value); | 
| 258   } | 258   } | 
| 259 | 259 | 
| 260   uword CompareAndSwapTags(uword old_tags, uword new_tags) const { | 260   uword CompareAndSwapTags(uword old_tags, uword new_tags) const { | 
| 261     return AtomicOperations::CompareAndSwapWord( | 261     return AtomicOperations::CompareAndSwapWord( | 
| 262         &raw()->ptr()->tags_, old_tags, new_tags); | 262         &raw()->ptr()->tags_, old_tags, new_tags); | 
| 263   } | 263   } | 
| 264   bool IsCanonical() const { | 264   bool IsCanonical() const { | 
| 265     ASSERT(!IsNull()); |  | 
| 266     return raw()->IsCanonical(); | 265     return raw()->IsCanonical(); | 
| 267   } | 266   } | 
| 268   void SetCanonical() const { | 267   void SetCanonical() const { | 
| 269     ASSERT(!IsNull()); |  | 
| 270     raw()->SetCanonical(); | 268     raw()->SetCanonical(); | 
| 271   } | 269   } | 
| 272   void ClearCanonical() const { | 270   void ClearCanonical() const { | 
| 273     ASSERT(!IsNull()); |  | 
| 274     raw()->ClearCanonical(); | 271     raw()->ClearCanonical(); | 
| 275   } | 272   } | 
| 276   intptr_t GetClassId() const { | 273   intptr_t GetClassId() const { | 
| 277     return !raw()->IsHeapObject() ? | 274     return !raw()->IsHeapObject() ? | 
| 278         static_cast<intptr_t>(kSmiCid) : raw()->GetClassId(); | 275         static_cast<intptr_t>(kSmiCid) : raw()->GetClassId(); | 
| 279   } | 276   } | 
| 280   inline RawClass* clazz() const; | 277   inline RawClass* clazz() const; | 
| 281   static intptr_t tags_offset() { return OFFSET_OF(RawObject, tags_); } | 278   static intptr_t tags_offset() { return OFFSET_OF(RawObject, tags_); } | 
| 282 | 279 | 
| 283   // Class testers. | 280   // Class testers. | 
| (...skipping 8209 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 8493 | 8490 | 
| 8494 | 8491 | 
| 8495 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8492 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 
| 8496                                                intptr_t index) { | 8493                                                intptr_t index) { | 
| 8497   return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8494   return array.At((index * kEntryLength) + kTargetFunctionIndex); | 
| 8498 } | 8495 } | 
| 8499 | 8496 | 
| 8500 }  // namespace dart | 8497 }  // namespace dart | 
| 8501 | 8498 | 
| 8502 #endif  // VM_OBJECT_H_ | 8499 #endif  // VM_OBJECT_H_ | 
| OLD | NEW | 
|---|