| OLD | NEW | 
|    1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |    1 // Copyright 2006-2008 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  205 } |  205 } | 
|  206  |  206  | 
|  207  |  207  | 
|  208 // ---------------------------------------------------------------------------- |  208 // ---------------------------------------------------------------------------- | 
|  209 // Hash function. |  209 // Hash function. | 
|  210  |  210  | 
|  211 uint32_t ComputeIntegerHash(uint32_t key); |  211 uint32_t ComputeIntegerHash(uint32_t key); | 
|  212  |  212  | 
|  213  |  213  | 
|  214 // ---------------------------------------------------------------------------- |  214 // ---------------------------------------------------------------------------- | 
 |  215 // Bitwise rotate word | 
 |  216  | 
 |  217 inline uint32_t RotateRight(uint32_t value, uint32_t n) { | 
 |  218   ASSERT(n < 31); | 
 |  219   return (value >> n) | (value << (32-n)); | 
 |  220 } | 
 |  221  | 
 |  222  | 
 |  223 inline uint32_t RotateLeft(uint32_t value, uint32_t n) { | 
 |  224   ASSERT(n < 31); | 
 |  225   return (value << n) | (value >> (32-n)); | 
 |  226 } | 
 |  227  | 
 |  228  | 
 |  229 // ---------------------------------------------------------------------------- | 
|  215 // I/O support. |  230 // I/O support. | 
|  216  |  231  | 
|  217 // Our version of printf(). Avoids compilation errors that we get |  232 // Our version of printf(). Avoids compilation errors that we get | 
|  218 // with standard printf when attempting to print pointers, etc. |  233 // with standard printf when attempting to print pointers, etc. | 
|  219 // (the errors are due to the extra compilation flags, which we |  234 // (the errors are due to the extra compilation flags, which we | 
|  220 // want elsewhere). |  235 // want elsewhere). | 
|  221 void PrintF(const char* format, ...); |  236 void PrintF(const char* format, ...); | 
|  222  |  237  | 
|  223 // Our version of fflush. |  238 // Our version of fflush. | 
|  224 void Flush(); |  239 void Flush(); | 
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  570 #endif |  585 #endif | 
|  571   while (dest < limit) { |  586   while (dest < limit) { | 
|  572     *dest++ = static_cast<sinkchar>(*src++); |  587     *dest++ = static_cast<sinkchar>(*src++); | 
|  573   } |  588   } | 
|  574 } |  589 } | 
|  575  |  590  | 
|  576  |  591  | 
|  577 } }  // namespace v8::internal |  592 } }  // namespace v8::internal | 
|  578  |  593  | 
|  579 #endif  // V8_UTILS_H_ |  594 #endif  // V8_UTILS_H_ | 
| OLD | NEW |