Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 } else { | 135 } else { |
| 136 int remaining = num_words; | 136 int remaining = num_words; |
| 137 do { | 137 do { |
| 138 remaining--; | 138 remaining--; |
| 139 *dst++ = *src++; | 139 *dst++ = *src++; |
| 140 } while (remaining > 0); | 140 } while (remaining > 0); |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 | 143 |
| 144 | 144 |
| 145 template <typename T> | 145 template <typename T, typename U> |
| 146 static inline void MemsetPointer(T** dest, T* value, int counter) { | 146 static inline void MemsetPointer(T** dest, U* value, int counter) { |
|
Vyacheslav Egorov (Chromium)
2011/10/04 11:00:51
well. this one is spooky.
at least at assignabil
fschneider
2011/10/04 11:28:16
Done.
| |
| 147 #if defined(V8_HOST_ARCH_IA32) | 147 #if defined(V8_HOST_ARCH_IA32) |
| 148 #define STOS "stosl" | 148 #define STOS "stosl" |
| 149 #elif defined(V8_HOST_ARCH_X64) | 149 #elif defined(V8_HOST_ARCH_X64) |
| 150 #define STOS "stosq" | 150 #define STOS "stosq" |
| 151 #endif | 151 #endif |
| 152 | 152 |
| 153 #if defined(__GNUC__) && defined(STOS) | 153 #if defined(__GNUC__) && defined(STOS) |
| 154 asm volatile( | 154 asm volatile( |
| 155 "cld;" | 155 "cld;" |
| 156 "rep ; " STOS | 156 "rep ; " STOS |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 | 261 |
| 262 // Add formatted contents like printf based on a va_list. | 262 // Add formatted contents like printf based on a va_list. |
| 263 void AddFormattedList(const char* format, va_list list); | 263 void AddFormattedList(const char* format, va_list list); |
| 264 private: | 264 private: |
| 265 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); | 265 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); |
| 266 }; | 266 }; |
| 267 | 267 |
| 268 } } // namespace v8::internal | 268 } } // namespace v8::internal |
| 269 | 269 |
| 270 #endif // V8_V8UTILS_H_ | 270 #endif // V8_V8UTILS_H_ |
| OLD | NEW |