| 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 2793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2804 static intptr_t InstanceSize() { return 0; } | 2804 static intptr_t InstanceSize() { return 0; } |
| 2805 | 2805 |
| 2806 static RawSmi* New(intptr_t value) { | 2806 static RawSmi* New(intptr_t value) { |
| 2807 word raw_smi = (value << kSmiTagShift) | kSmiTag; | 2807 word raw_smi = (value << kSmiTagShift) | kSmiTag; |
| 2808 ASSERT(ValueFromRaw(raw_smi) == value); | 2808 ASSERT(ValueFromRaw(raw_smi) == value); |
| 2809 return reinterpret_cast<RawSmi*>(raw_smi); | 2809 return reinterpret_cast<RawSmi*>(raw_smi); |
| 2810 } | 2810 } |
| 2811 | 2811 |
| 2812 static RawClass* Class(); | 2812 static RawClass* Class(); |
| 2813 | 2813 |
| 2814 static intptr_t Value(RawSmi* raw_smi) { | 2814 static intptr_t Value(const RawSmi* raw_smi) { |
| 2815 return ValueFromRaw(reinterpret_cast<uword>(raw_smi)); | 2815 return ValueFromRaw(reinterpret_cast<uword>(raw_smi)); |
| 2816 } | 2816 } |
| 2817 | 2817 |
| 2818 static intptr_t RawValue(intptr_t value) { | 2818 static intptr_t RawValue(intptr_t value) { |
| 2819 return reinterpret_cast<intptr_t>(New(value)); | 2819 return reinterpret_cast<intptr_t>(New(value)); |
| 2820 } | 2820 } |
| 2821 | 2821 |
| 2822 static bool IsValid(intptr_t value) { | 2822 static bool IsValid(intptr_t value) { |
| 2823 return (value >= kMinValue) && (value <= kMaxValue); | 2823 return (value >= kMinValue) && (value <= kMaxValue); |
| 2824 } | 2824 } |
| (...skipping 2134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4959 } | 4959 } |
| 4960 | 4960 |
| 4961 | 4961 |
| 4962 intptr_t Stackmap::SizeInBits() const { | 4962 intptr_t Stackmap::SizeInBits() const { |
| 4963 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 4963 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
| 4964 } | 4964 } |
| 4965 | 4965 |
| 4966 } // namespace dart | 4966 } // namespace dart |
| 4967 | 4967 |
| 4968 #endif // VM_OBJECT_H_ | 4968 #endif // VM_OBJECT_H_ |
| OLD | NEW |