| OLD | NEW |
| 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 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 memcpy(dest, src, 15); | 1428 memcpy(dest, src, 15); |
| 1429 break; | 1429 break; |
| 1430 default: | 1430 default: |
| 1431 MemCopy(dest, src, chars); | 1431 MemCopy(dest, src, chars); |
| 1432 break; | 1432 break; |
| 1433 } | 1433 } |
| 1434 } | 1434 } |
| 1435 | 1435 |
| 1436 | 1436 |
| 1437 void CopyCharsUnsigned(uint16_t* dest, const uint8_t* src, size_t chars) { | 1437 void CopyCharsUnsigned(uint16_t* dest, const uint8_t* src, size_t chars) { |
| 1438 if (chars >= kMinComplexConvertMemCopy) { | 1438 if (chars >= static_cast<size_t>(kMinComplexConvertMemCopy)) { |
| 1439 MemCopyUint16Uint8(dest, src, chars); | 1439 MemCopyUint16Uint8(dest, src, chars); |
| 1440 } else { | 1440 } else { |
| 1441 MemCopyUint16Uint8Wrapper(dest, src, chars); | 1441 MemCopyUint16Uint8Wrapper(dest, src, chars); |
| 1442 } | 1442 } |
| 1443 } | 1443 } |
| 1444 | 1444 |
| 1445 | 1445 |
| 1446 void CopyCharsUnsigned(uint16_t* dest, const uint16_t* src, size_t chars) { | 1446 void CopyCharsUnsigned(uint16_t* dest, const uint16_t* src, size_t chars) { |
| 1447 switch (static_cast<unsigned>(chars)) { | 1447 switch (static_cast<unsigned>(chars)) { |
| 1448 case 0: | 1448 case 0: |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1675 // Takes the address of the limit variable in order to find out where | 1675 // Takes the address of the limit variable in order to find out where |
| 1676 // the top of stack is right now. | 1676 // the top of stack is right now. |
| 1677 uintptr_t limit = reinterpret_cast<uintptr_t>(&limit); | 1677 uintptr_t limit = reinterpret_cast<uintptr_t>(&limit); |
| 1678 return limit; | 1678 return limit; |
| 1679 } | 1679 } |
| 1680 | 1680 |
| 1681 } // namespace internal | 1681 } // namespace internal |
| 1682 } // namespace v8 | 1682 } // namespace v8 |
| 1683 | 1683 |
| 1684 #endif // V8_UTILS_H_ | 1684 #endif // V8_UTILS_H_ |
| OLD | NEW |