| 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 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2808 static intptr_t InstanceSize() { return 0; } | 2808 static intptr_t InstanceSize() { return 0; } |
| 2809 | 2809 |
| 2810 static RawSmi* New(intptr_t value) { | 2810 static RawSmi* New(intptr_t value) { |
| 2811 word raw_smi = (value << kSmiTagShift) | kSmiTag; | 2811 word raw_smi = (value << kSmiTagShift) | kSmiTag; |
| 2812 ASSERT(ValueFromRaw(raw_smi) == value); | 2812 ASSERT(ValueFromRaw(raw_smi) == value); |
| 2813 return reinterpret_cast<RawSmi*>(raw_smi); | 2813 return reinterpret_cast<RawSmi*>(raw_smi); |
| 2814 } | 2814 } |
| 2815 | 2815 |
| 2816 static RawClass* Class(); | 2816 static RawClass* Class(); |
| 2817 | 2817 |
| 2818 static intptr_t Value(RawSmi* raw_smi) { | 2818 static intptr_t Value(const RawSmi* raw_smi) { |
| 2819 return ValueFromRaw(reinterpret_cast<uword>(raw_smi)); | 2819 return ValueFromRaw(reinterpret_cast<uword>(raw_smi)); |
| 2820 } | 2820 } |
| 2821 | 2821 |
| 2822 static intptr_t RawValue(intptr_t value) { | 2822 static intptr_t RawValue(intptr_t value) { |
| 2823 return reinterpret_cast<intptr_t>(New(value)); | 2823 return reinterpret_cast<intptr_t>(New(value)); |
| 2824 } | 2824 } |
| 2825 | 2825 |
| 2826 static bool IsValid(intptr_t value) { | 2826 static bool IsValid(intptr_t value) { |
| 2827 return (value >= kMinValue) && (value <= kMaxValue); | 2827 return (value >= kMinValue) && (value <= kMaxValue); |
| 2828 } | 2828 } |
| (...skipping 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4975 } | 4975 } |
| 4976 | 4976 |
| 4977 | 4977 |
| 4978 intptr_t Stackmap::SizeInBits() const { | 4978 intptr_t Stackmap::SizeInBits() const { |
| 4979 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 4979 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
| 4980 } | 4980 } |
| 4981 | 4981 |
| 4982 } // namespace dart | 4982 } // namespace dart |
| 4983 | 4983 |
| 4984 #endif // VM_OBJECT_H_ | 4984 #endif // VM_OBJECT_H_ |
| OLD | NEW |