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

Side by Side Diff: src/objects.h

Issue 750093003: Fix clang++ warnings on -Wtautological-constant-out-of-range-compare (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use static_cast instead of removing the DCHECK Created 6 years 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 | « src/elements.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 5721 matching lines...) Expand 10 before | Expand all | Expand 10 after
5732 inline bool is_observed() { 5732 inline bool is_observed() {
5733 return ((1 << kIsObserved) & bit_field()) != 0; 5733 return ((1 << kIsObserved) & bit_field()) != 0;
5734 } 5734 }
5735 5735
5736 inline void set_is_extensible(bool value); 5736 inline void set_is_extensible(bool value);
5737 inline bool is_extensible(); 5737 inline bool is_extensible();
5738 inline void set_is_prototype_map(bool value); 5738 inline void set_is_prototype_map(bool value);
5739 inline bool is_prototype_map(); 5739 inline bool is_prototype_map();
5740 5740
5741 inline void set_elements_kind(ElementsKind elements_kind) { 5741 inline void set_elements_kind(ElementsKind elements_kind) {
5742 DCHECK(elements_kind < kElementsKindCount); 5742 DCHECK(static_cast<int>(elements_kind) < kElementsKindCount);
5743 DCHECK(kElementsKindCount <= (1 << Map::ElementsKindBits::kSize)); 5743 DCHECK(kElementsKindCount <= (1 << Map::ElementsKindBits::kSize));
5744 set_bit_field2(Map::ElementsKindBits::update(bit_field2(), elements_kind)); 5744 set_bit_field2(Map::ElementsKindBits::update(bit_field2(), elements_kind));
5745 DCHECK(this->elements_kind() == elements_kind); 5745 DCHECK(this->elements_kind() == elements_kind);
5746 } 5746 }
5747 5747
5748 inline ElementsKind elements_kind() { 5748 inline ElementsKind elements_kind() {
5749 return Map::ElementsKindBits::decode(bit_field2()); 5749 return Map::ElementsKindBits::decode(bit_field2());
5750 } 5750 }
5751 5751
5752 // Tells whether the instance has fast elements that are only Smis. 5752 // Tells whether the instance has fast elements that are only Smis.
(...skipping 5244 matching lines...) Expand 10 before | Expand all | Expand 10 after
10997 } else { 10997 } else {
10998 value &= ~(1 << bit_position); 10998 value &= ~(1 << bit_position);
10999 } 10999 }
11000 return value; 11000 return value;
11001 } 11001 }
11002 }; 11002 };
11003 11003
11004 } } // namespace v8::internal 11004 } } // namespace v8::internal
11005 11005
11006 #endif // V8_OBJECTS_H_ 11006 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/elements.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698