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

Side by Side Diff: src/objects.h

Issue 304533007: Fix lint complaints in objects.h (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing ; Created 6 years, 6 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 | Annotate | Revision Log
« 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 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 "allocation.h" 8 #include "allocation.h"
9 #include "assert-scope.h" 9 #include "assert-scope.h"
10 #include "builtins.h" 10 #include "builtins.h"
(...skipping 8780 matching lines...) Expand 10 before | Expand all | Expand 10 after
8791 // For strings which are array indexes the hash value has the string length 8791 // For strings which are array indexes the hash value has the string length
8792 // mixed into the hash, mainly to avoid a hash value of zero which would be 8792 // mixed into the hash, mainly to avoid a hash value of zero which would be
8793 // the case for the string '0'. 24 bits are used for the array index value. 8793 // the case for the string '0'. 24 bits are used for the array index value.
8794 static const int kArrayIndexValueBits = 24; 8794 static const int kArrayIndexValueBits = 24;
8795 static const int kArrayIndexLengthBits = 8795 static const int kArrayIndexLengthBits =
8796 kBitsPerInt - kArrayIndexValueBits - kNofHashBitFields; 8796 kBitsPerInt - kArrayIndexValueBits - kNofHashBitFields;
8797 8797
8798 STATIC_ASSERT((kArrayIndexLengthBits > 0)); 8798 STATIC_ASSERT((kArrayIndexLengthBits > 0));
8799 8799
8800 class ArrayIndexValueBits : public BitField<unsigned int, kNofHashBitFields, 8800 class ArrayIndexValueBits : public BitField<unsigned int, kNofHashBitFields,
8801 kArrayIndexValueBits> {}; 8801 kArrayIndexValueBits> {}; // NOLINT
8802 class ArrayIndexLengthBits : public BitField<unsigned int, 8802 class ArrayIndexLengthBits : public BitField<unsigned int,
8803 kNofHashBitFields + kArrayIndexValueBits, 8803 kNofHashBitFields + kArrayIndexValueBits,
8804 kArrayIndexLengthBits> {}; 8804 kArrayIndexLengthBits> {}; // NOLINT
8805 8805
8806 // Check that kMaxCachedArrayIndexLength + 1 is a power of two so we 8806 // Check that kMaxCachedArrayIndexLength + 1 is a power of two so we
8807 // could use a mask to test if the length of string is less than or equal to 8807 // could use a mask to test if the length of string is less than or equal to
8808 // kMaxCachedArrayIndexLength. 8808 // kMaxCachedArrayIndexLength.
8809 STATIC_ASSERT(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); 8809 STATIC_ASSERT(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1));
8810 8810
8811 static const unsigned int kContainsCachedArrayIndexMask = 8811 static const unsigned int kContainsCachedArrayIndexMask =
8812 (~kMaxCachedArrayIndexLength << ArrayIndexLengthBits::kShift) | 8812 (~kMaxCachedArrayIndexLength << ArrayIndexLengthBits::kShift) |
8813 kIsNotArrayIndexMask; 8813 kIsNotArrayIndexMask;
8814 8814
(...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after
11074 } else { 11074 } else {
11075 value &= ~(1 << bit_position); 11075 value &= ~(1 << bit_position);
11076 } 11076 }
11077 return value; 11077 return value;
11078 } 11078 }
11079 }; 11079 };
11080 11080
11081 } } // namespace v8::internal 11081 } } // namespace v8::internal
11082 11082
11083 #endif // V8_OBJECTS_H_ 11083 #endif // V8_OBJECTS_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