| 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 #include "vm/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/become.h" | 10 #include "vm/become.h" |
| (...skipping 18144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18155 } | 18155 } |
| 18156 | 18156 |
| 18157 RawInteger* Integer::NewFromUint64(uint64_t value, Heap::Space space) { | 18157 RawInteger* Integer::NewFromUint64(uint64_t value, Heap::Space space) { |
| 18158 if (!FLAG_limit_ints_to_64_bits && | 18158 if (!FLAG_limit_ints_to_64_bits && |
| 18159 (value > static_cast<uint64_t>(Mint::kMaxValue))) { | 18159 (value > static_cast<uint64_t>(Mint::kMaxValue))) { |
| 18160 return Bigint::NewFromUint64(value, space); | 18160 return Bigint::NewFromUint64(value, space); |
| 18161 } | 18161 } |
| 18162 return Integer::New(static_cast<int64_t>(value), space); | 18162 return Integer::New(static_cast<int64_t>(value), space); |
| 18163 } | 18163 } |
| 18164 | 18164 |
| 18165 bool Integer::IsValidUint64(uint64_t value) { | 18165 bool Integer::IsValueInRange(uint64_t value) { |
| 18166 if (FLAG_limit_ints_to_64_bits) { | 18166 if (FLAG_limit_ints_to_64_bits) { |
| 18167 return (value <= static_cast<uint64_t>(Mint::kMaxValue)); | 18167 return (value <= static_cast<uint64_t>(Mint::kMaxValue)); |
| 18168 } else { | 18168 } else { |
| 18169 return true; | 18169 return true; |
| 18170 } | 18170 } |
| 18171 } | 18171 } |
| 18172 | 18172 |
| 18173 bool Integer::Equals(const Instance& other) const { | 18173 bool Integer::Equals(const Instance& other) const { |
| 18174 // Integer is an abstract class. | 18174 // Integer is an abstract class. |
| 18175 UNREACHABLE(); | 18175 UNREACHABLE(); |
| (...skipping 4360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22536 } | 22536 } |
| 22537 return UserTag::null(); | 22537 return UserTag::null(); |
| 22538 } | 22538 } |
| 22539 | 22539 |
| 22540 const char* UserTag::ToCString() const { | 22540 const char* UserTag::ToCString() const { |
| 22541 const String& tag_label = String::Handle(label()); | 22541 const String& tag_label = String::Handle(label()); |
| 22542 return tag_label.ToCString(); | 22542 return tag_label.ToCString(); |
| 22543 } | 22543 } |
| 22544 | 22544 |
| 22545 } // namespace dart | 22545 } // namespace dart |
| OLD | NEW |