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

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

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/dart_api_impl.cc ('k') | runtime/vm/object.cc » ('j') | 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 #ifndef RUNTIME_VM_OBJECT_H_ 5 #ifndef RUNTIME_VM_OBJECT_H_
6 #define RUNTIME_VM_OBJECT_H_ 6 #define RUNTIME_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 6418 matching lines...) Expand 10 before | Expand all | Expand 10 after
6429 static RawInteger* NewFromUint64(uint64_t value, 6429 static RawInteger* NewFromUint64(uint64_t value,
6430 Heap::Space space = Heap::kNew); 6430 Heap::Space space = Heap::kNew);
6431 6431
6432 // Returns a canonical Integer object allocated in the old gen space. 6432 // Returns a canonical Integer object allocated in the old gen space.
6433 // Returns null if integer is out of range (in --limit-ints-to-64-bits mode). 6433 // Returns null if integer is out of range (in --limit-ints-to-64-bits mode).
6434 static RawInteger* NewCanonical(const String& str); 6434 static RawInteger* NewCanonical(const String& str);
6435 6435
6436 static RawInteger* New(int64_t value, Heap::Space space = Heap::kNew); 6436 static RawInteger* New(int64_t value, Heap::Space space = Heap::kNew);
6437 6437
6438 // Returns true iff the given uint64_t value is representable as Dart integer. 6438 // Returns true iff the given uint64_t value is representable as Dart integer.
6439 static bool IsValidUint64(uint64_t value); 6439 static bool IsValueInRange(uint64_t value);
6440 6440
6441 virtual bool OperatorEquals(const Instance& other) const { 6441 virtual bool OperatorEquals(const Instance& other) const {
6442 return Equals(other); 6442 return Equals(other);
6443 } 6443 }
6444 virtual bool CanonicalizeEquals(const Instance& other) const { 6444 virtual bool CanonicalizeEquals(const Instance& other) const {
6445 return Equals(other); 6445 return Equals(other);
6446 } 6446 }
6447 virtual uword ComputeCanonicalTableHash() const { 6447 virtual uword ComputeCanonicalTableHash() const {
6448 UNREACHABLE(); 6448 UNREACHABLE();
6449 return 0; 6449 return 0;
(...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after
8992 8992
8993 inline void TypeArguments::SetHash(intptr_t value) const { 8993 inline void TypeArguments::SetHash(intptr_t value) const {
8994 // This is only safe because we create a new Smi, which does not cause 8994 // This is only safe because we create a new Smi, which does not cause
8995 // heap allocation. 8995 // heap allocation.
8996 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 8996 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
8997 } 8997 }
8998 8998
8999 } // namespace dart 8999 } // namespace dart
9000 9000
9001 #endif // RUNTIME_VM_OBJECT_H_ 9001 #endif // RUNTIME_VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698