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

Side by Side Diff: src/types.h

Issue 1055933004: Make BitsetType enum uint32_t to avoid narrowing warnings (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_TYPES_H_ 5 #ifndef V8_TYPES_H_
6 #define V8_TYPES_H_ 6 #define V8_TYPES_H_
7 7
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 623
624 624
625 // ----------------------------------------------------------------------------- 625 // -----------------------------------------------------------------------------
626 // Bitset types (internal). 626 // Bitset types (internal).
627 627
628 template<class Config> 628 template<class Config>
629 class TypeImpl<Config>::BitsetType : public TypeImpl<Config> { 629 class TypeImpl<Config>::BitsetType : public TypeImpl<Config> {
630 protected: 630 protected:
631 friend class TypeImpl<Config>; 631 friend class TypeImpl<Config>;
632 632
633 enum { 633 enum : uint32_t {
634 #define DECLARE_TYPE(type, value) k##type = (value), 634 #define DECLARE_TYPE(type, value) k##type = (value),
635 BITSET_TYPE_LIST(DECLARE_TYPE) 635 BITSET_TYPE_LIST(DECLARE_TYPE)
636 #undef DECLARE_TYPE 636 #undef DECLARE_TYPE
637 kUnusedEOL = 0 637 kUnusedEOL = 0
638 }; 638 };
639 639
640 static bitset SignedSmall(); 640 static bitset SignedSmall();
641 static bitset UnsignedSmall(); 641 static bitset UnsignedSmall();
642 642
643 bitset Bitset() { return Config::as_bitset(this); } 643 bitset Bitset() { return Config::as_bitset(this); }
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 bool Narrows(BoundsImpl that) { 1151 bool Narrows(BoundsImpl that) {
1152 return that.lower->Is(this->lower) && this->upper->Is(that.upper); 1152 return that.lower->Is(this->lower) && this->upper->Is(that.upper);
1153 } 1153 }
1154 }; 1154 };
1155 1155
1156 typedef BoundsImpl<ZoneTypeConfig> Bounds; 1156 typedef BoundsImpl<ZoneTypeConfig> Bounds;
1157 1157
1158 } } // namespace v8::internal 1158 } } // namespace v8::internal
1159 1159
1160 #endif // V8_TYPES_H_ 1160 #endif // V8_TYPES_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698