| 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 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1875 struct Element { | 1875 struct Element { |
| 1876 uint32_t in[2]; | 1876 uint32_t in[2]; |
| 1877 Object* output; | 1877 Object* output; |
| 1878 }; | 1878 }; |
| 1879 union Converter { | 1879 union Converter { |
| 1880 double dbl; | 1880 double dbl; |
| 1881 uint32_t integers[2]; | 1881 uint32_t integers[2]; |
| 1882 }; | 1882 }; |
| 1883 inline static int Hash(const Converter& c) { | 1883 inline static int Hash(const Converter& c) { |
| 1884 uint32_t hash = (c.integers[0] ^ c.integers[1]); | 1884 uint32_t hash = (c.integers[0] ^ c.integers[1]); |
| 1885 hash ^= hash >> 16; | 1885 hash ^= static_cast<int32_t>(hash) >> 16; |
| 1886 hash ^= hash >> 8; | 1886 hash ^= static_cast<int32_t>(hash) >> 8; |
| 1887 return (hash & (kCacheSize - 1)); | 1887 return (hash & (kCacheSize - 1)); |
| 1888 } | 1888 } |
| 1889 | 1889 |
| 1890 static Address cache_array_address() { | 1890 static Address cache_array_address() { |
| 1891 // Used to create an external reference. | 1891 // Used to create an external reference. |
| 1892 return reinterpret_cast<Address>(caches_); | 1892 return reinterpret_cast<Address>(caches_); |
| 1893 } | 1893 } |
| 1894 | 1894 |
| 1895 // Allow access to the caches_ array as an ExternalReference. | 1895 // Allow access to the caches_ array as an ExternalReference. |
| 1896 friend class ExternalReference; | 1896 friend class ExternalReference; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1932 | 1932 |
| 1933 // To speed up scavenge collections new space string are kept | 1933 // To speed up scavenge collections new space string are kept |
| 1934 // separate from old space strings. | 1934 // separate from old space strings. |
| 1935 static List<Object*> new_space_strings_; | 1935 static List<Object*> new_space_strings_; |
| 1936 static List<Object*> old_space_strings_; | 1936 static List<Object*> old_space_strings_; |
| 1937 }; | 1937 }; |
| 1938 | 1938 |
| 1939 } } // namespace v8::internal | 1939 } } // namespace v8::internal |
| 1940 | 1940 |
| 1941 #endif // V8_HEAP_H_ | 1941 #endif // V8_HEAP_H_ |
| OLD | NEW |