Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(458)

Side by Side Diff: runtime/vm/object.cc

Issue 2992783002: [vm] Rename Integer::IsValidUint64 to IsValueInRange for clarity (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698