OLD | NEW |
1 // Copyright 2011 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 12 matching lines...) Expand all Loading... |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #ifndef V8_COMPILATION_CACHE_H_ | 28 #ifndef V8_COMPILATION_CACHE_H_ |
29 #define V8_COMPILATION_CACHE_H_ | 29 #define V8_COMPILATION_CACHE_H_ |
30 | 30 |
31 namespace v8 { | 31 namespace v8 { |
32 namespace internal { | 32 namespace internal { |
33 | 33 |
34 class HashMap; | |
35 | |
36 // The compilation cache consists of several generational sub-caches which uses | 34 // The compilation cache consists of several generational sub-caches which uses |
37 // this class as a base class. A sub-cache contains a compilation cache tables | 35 // this class as a base class. A sub-cache contains a compilation cache tables |
38 // for each generation of the sub-cache. Since the same source code string has | 36 // for each generation of the sub-cache. Since the same source code string has |
39 // different compiled code for scripts and evals, we use separate sub-caches | 37 // different compiled code for scripts and evals, we use separate sub-caches |
40 // for different compilation modes, to avoid retrieving the wrong result. | 38 // for different compilation modes, to avoid retrieving the wrong result. |
41 class CompilationSubCache { | 39 class CompilationSubCache { |
42 public: | 40 public: |
43 CompilationSubCache(Isolate* isolate, int generations) | 41 CompilationSubCache(Isolate* isolate, int generations) |
44 : isolate_(isolate), | 42 : isolate_(isolate), |
45 generations_(generations) { | 43 generations_(generations) { |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 285 |
288 friend class Isolate; | 286 friend class Isolate; |
289 | 287 |
290 DISALLOW_COPY_AND_ASSIGN(CompilationCache); | 288 DISALLOW_COPY_AND_ASSIGN(CompilationCache); |
291 }; | 289 }; |
292 | 290 |
293 | 291 |
294 } } // namespace v8::internal | 292 } } // namespace v8::internal |
295 | 293 |
296 #endif // V8_COMPILATION_CACHE_H_ | 294 #endif // V8_COMPILATION_CACHE_H_ |
OLD | NEW |