| Index: src/utils.h
|
| ===================================================================
|
| --- src/utils.h (revision 535)
|
| +++ src/utils.h (working copy)
|
| @@ -443,6 +443,19 @@
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder);
|
| };
|
|
|
| +
|
| +// Widening copy from ASCII to 16 bit chars. This is templatized to allow
|
| +// it to be used inside if statements in templatized callers, but it is only
|
| +// usable for sinkchar == uc16.
|
| +template <typename sinkchar>
|
| +static inline void Cpy168(sinkchar* dest, const unsigned char* src, int chars) {
|
| + ASSERT(sizeof(sinkchar) == 2);
|
| + while (chars--) {
|
| + char c = *src++;
|
| + *dest++ = c;
|
| + }
|
| +}
|
| +
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_UTILS_H_
|
|
|