OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2886 matching lines...) Loading... | |
2897 private: | 2897 private: |
2898 static const int kArrayEntriesPerCacheEntry = 4; | 2898 static const int kArrayEntriesPerCacheEntry = 4; |
2899 static const int kStringOffset = 0; | 2899 static const int kStringOffset = 0; |
2900 static const int kPatternOffset = 1; | 2900 static const int kPatternOffset = 1; |
2901 static const int kArrayOffset = 2; | 2901 static const int kArrayOffset = 2; |
2902 }; | 2902 }; |
2903 | 2903 |
2904 | 2904 |
2905 class TranscendentalCache { | 2905 class TranscendentalCache { |
2906 public: | 2906 public: |
2907 enum Type {ACOS, ASIN, ATAN, COS, EXP, LOG, SIN, TAN, kNumberOfCaches}; | 2907 enum Type { EXP, LOG, kNumberOfCaches}; |
Jakob Kummerow
2013/12/04 10:21:06
go ahead and remove EXP here too.
| |
2908 static const int kTranscendentalTypeBits = 3; | 2908 static const int kTranscendentalTypeBits = 3; |
2909 STATIC_ASSERT((1 << kTranscendentalTypeBits) >= kNumberOfCaches); | 2909 STATIC_ASSERT((1 << kTranscendentalTypeBits) >= kNumberOfCaches); |
2910 | 2910 |
2911 // Returns a heap number with f(input), where f is a math function specified | 2911 // Returns a heap number with f(input), where f is a math function specified |
2912 // by the 'type' argument. | 2912 // by the 'type' argument. |
2913 MUST_USE_RESULT inline MaybeObject* Get(Type type, double input); | 2913 MUST_USE_RESULT inline MaybeObject* Get(Type type, double input); |
2914 | 2914 |
2915 // The cache contains raw Object pointers. This method disposes of | 2915 // The cache contains raw Object pointers. This method disposes of |
2916 // them before a garbage collection. | 2916 // them before a garbage collection. |
2917 void Clear(); | 2917 void Clear(); |
(...skipping 170 matching lines...) Loading... | |
3088 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3088 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3089 | 3089 |
3090 private: | 3090 private: |
3091 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3091 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3092 }; | 3092 }; |
3093 #endif // DEBUG | 3093 #endif // DEBUG |
3094 | 3094 |
3095 } } // namespace v8::internal | 3095 } } // namespace v8::internal |
3096 | 3096 |
3097 #endif // V8_HEAP_H_ | 3097 #endif // V8_HEAP_H_ |
OLD | NEW |