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

Side by Side Diff: src/utils.h

Issue 2875273002: Remove outdated comment. (Closed)
Patch Set: Created 3 years, 7 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 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_UTILS_H_ 5 #ifndef V8_UTILS_H_
6 #define V8_UTILS_H_ 6 #define V8_UTILS_H_
7 7
8 #include <limits.h> 8 #include <limits.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 const char* str, int size, bool verbose = true); 1035 const char* str, int size, bool verbose = true);
1036 1036
1037 1037
1038 // ---------------------------------------------------------------------------- 1038 // ----------------------------------------------------------------------------
1039 // Memory 1039 // Memory
1040 1040
1041 // Copies words from |src| to |dst|. The data spans must not overlap. 1041 // Copies words from |src| to |dst|. The data spans must not overlap.
1042 template <typename T> 1042 template <typename T>
1043 inline void CopyWords(T* dst, const T* src, size_t num_words) { 1043 inline void CopyWords(T* dst, const T* src, size_t num_words) {
1044 STATIC_ASSERT(sizeof(T) == kPointerSize); 1044 STATIC_ASSERT(sizeof(T) == kPointerSize);
1045 // TODO(mvstanton): disabled because mac builds are bogus failing on this 1045 DCHECK(Min(dst, const_cast<T*>(src)) + num_words <=
1046 // assert. They are doing a signed comparison. Investigate in 1046 Max(dst, const_cast<T*>(src)));
1047 // the morning.
1048 // DCHECK(Min(dst, const_cast<T*>(src)) + num_words <=
1049 // Max(dst, const_cast<T*>(src)));
1050 DCHECK(num_words > 0); 1047 DCHECK(num_words > 0);
1051 1048
1052 // Use block copying MemCopy if the segment we're copying is 1049 // Use block copying MemCopy if the segment we're copying is
1053 // enough to justify the extra call/setup overhead. 1050 // enough to justify the extra call/setup overhead.
1054 static const size_t kBlockCopyLimit = 16; 1051 static const size_t kBlockCopyLimit = 16;
1055 1052
1056 if (num_words < kBlockCopyLimit) { 1053 if (num_words < kBlockCopyLimit) {
1057 do { 1054 do {
1058 num_words--; 1055 num_words--;
1059 *dst++ = *src++; 1056 *dst++ = *src++;
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 private: 1712 private:
1716 T value_; 1713 T value_;
1717 ThreadedListZoneEntry<T>* next_; 1714 ThreadedListZoneEntry<T>* next_;
1718 DISALLOW_COPY_AND_ASSIGN(ThreadedListZoneEntry); 1715 DISALLOW_COPY_AND_ASSIGN(ThreadedListZoneEntry);
1719 }; 1716 };
1720 1717
1721 } // namespace internal 1718 } // namespace internal
1722 } // namespace v8 1719 } // namespace v8
1723 1720
1724 #endif // V8_UTILS_H_ 1721 #endif // V8_UTILS_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