| 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 3901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3912 return false; | 3912 return false; |
| 3913 } | 3913 } |
| 3914 OBJECT_IMPLEMENTATION(Number, Instance); | 3914 OBJECT_IMPLEMENTATION(Number, Instance); |
| 3915 friend class Class; | 3915 friend class Class; |
| 3916 }; | 3916 }; |
| 3917 | 3917 |
| 3918 | 3918 |
| 3919 class Integer : public Number { | 3919 class Integer : public Number { |
| 3920 public: | 3920 public: |
| 3921 static RawInteger* New(const String& str, Heap::Space space = Heap::kNew); | 3921 static RawInteger* New(const String& str, Heap::Space space = Heap::kNew); |
| 3922 static RawInteger* NewFromUint64( |
| 3923 uint64_t value, Heap::Space space = Heap::kNew); |
| 3922 | 3924 |
| 3923 // Returns a canonical Integer object allocated in the old gen space. | 3925 // Returns a canonical Integer object allocated in the old gen space. |
| 3924 static RawInteger* NewCanonical(const String& str); | 3926 static RawInteger* NewCanonical(const String& str); |
| 3925 | 3927 |
| 3926 static RawInteger* New(int64_t value, Heap::Space space = Heap::kNew); | 3928 static RawInteger* New(int64_t value, Heap::Space space = Heap::kNew); |
| 3927 | 3929 |
| 3928 virtual double AsDoubleValue() const; | 3930 virtual double AsDoubleValue() const; |
| 3929 virtual int64_t AsInt64Value() const; | 3931 virtual int64_t AsInt64Value() const; |
| 3930 | 3932 |
| 3931 // Returns 0, -1 or 1. | 3933 // Returns 0, -1 or 1. |
| (...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5766 | 5768 |
| 5767 | 5769 |
| 5768 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 5770 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 5769 intptr_t index) { | 5771 intptr_t index) { |
| 5770 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 5772 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 5771 } | 5773 } |
| 5772 | 5774 |
| 5773 } // namespace dart | 5775 } // namespace dart |
| 5774 | 5776 |
| 5775 #endif // VM_OBJECT_H_ | 5777 #endif // VM_OBJECT_H_ |
| OLD | NEW |