OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 return (hash & (kCacheSize - 1)); | 2047 return (hash & (kCacheSize - 1)); |
2048 } | 2048 } |
2049 | 2049 |
2050 static Address cache_array_address() { | 2050 static Address cache_array_address() { |
2051 // Used to create an external reference. | 2051 // Used to create an external reference. |
2052 return reinterpret_cast<Address>(caches_); | 2052 return reinterpret_cast<Address>(caches_); |
2053 } | 2053 } |
2054 | 2054 |
2055 // Allow access to the caches_ array as an ExternalReference. | 2055 // Allow access to the caches_ array as an ExternalReference. |
2056 friend class ExternalReference; | 2056 friend class ExternalReference; |
2057 // Inline implementation of the caching. | 2057 // Inline implementation of the cache. |
2058 friend class TranscendentalCacheStub; | 2058 friend class TranscendentalCacheStub; |
| 2059 friend class TranscendentalCacheSSE2Stub; |
2059 | 2060 |
2060 static TranscendentalCache* caches_[kNumberOfCaches]; | 2061 static TranscendentalCache* caches_[kNumberOfCaches]; |
2061 Element elements_[kCacheSize]; | 2062 Element elements_[kCacheSize]; |
2062 Type type_; | 2063 Type type_; |
2063 }; | 2064 }; |
2064 | 2065 |
2065 | 2066 |
2066 // External strings table is a place where all external strings are | 2067 // External strings table is a place where all external strings are |
2067 // registered. We need to keep track of such strings to properly | 2068 // registered. We need to keep track of such strings to properly |
2068 // finalize them. | 2069 // finalize them. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2105 // Return whether this object should be retained. If NULL is returned the | 2106 // Return whether this object should be retained. If NULL is returned the |
2106 // object has no references. Otherwise the address of the retained object | 2107 // object has no references. Otherwise the address of the retained object |
2107 // should be returned as in some GC situations the object has been moved. | 2108 // should be returned as in some GC situations the object has been moved. |
2108 virtual Object* RetainAs(Object* object) = 0; | 2109 virtual Object* RetainAs(Object* object) = 0; |
2109 }; | 2110 }; |
2110 | 2111 |
2111 | 2112 |
2112 } } // namespace v8::internal | 2113 } } // namespace v8::internal |
2113 | 2114 |
2114 #endif // V8_HEAP_H_ | 2115 #endif // V8_HEAP_H_ |
OLD | NEW |