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

Side by Side Diff: src/objects.h

Issue 136453016: A64: Ensure String::kContainsCachedArrayIndexMask is a uint32 constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 7669 matching lines...) Expand 10 before | Expand all | Expand 10 after
7680 static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1; 7680 static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1;
7681 7681
7682 static const int kArrayIndexValueMask = 7682 static const int kArrayIndexValueMask =
7683 ((1 << kArrayIndexValueBits) - 1) << kHashShift; 7683 ((1 << kArrayIndexValueBits) - 1) << kHashShift;
7684 7684
7685 // Check that kMaxCachedArrayIndexLength + 1 is a power of two so we 7685 // Check that kMaxCachedArrayIndexLength + 1 is a power of two so we
7686 // could use a mask to test if the length of string is less than or equal to 7686 // could use a mask to test if the length of string is less than or equal to
7687 // kMaxCachedArrayIndexLength. 7687 // kMaxCachedArrayIndexLength.
7688 STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); 7688 STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1));
7689 7689
7690 static const int kContainsCachedArrayIndexMask = 7690 static const unsigned int kContainsCachedArrayIndexMask =
7691 (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) | 7691 (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) |
7692 kIsNotArrayIndexMask; 7692 kIsNotArrayIndexMask;
7693 7693
7694 // Value of empty hash field indicating that the hash is not computed. 7694 // Value of empty hash field indicating that the hash is not computed.
7695 static const int kEmptyHashField = 7695 static const int kEmptyHashField =
7696 kIsNotArrayIndexMask | kHashNotComputedMask; 7696 kIsNotArrayIndexMask | kHashNotComputedMask;
7697 7697
7698 protected: 7698 protected:
7699 static inline bool IsHashFieldComputed(uint32_t field); 7699 static inline bool IsHashFieldComputed(uint32_t field);
7700 7700
(...skipping 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after
9747 } else { 9747 } else {
9748 value &= ~(1 << bit_position); 9748 value &= ~(1 << bit_position);
9749 } 9749 }
9750 return value; 9750 return value;
9751 } 9751 }
9752 }; 9752 };
9753 9753
9754 } } // namespace v8::internal 9754 } } // namespace v8::internal
9755 9755
9756 #endif // V8_OBJECTS_H_ 9756 #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