| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILATION_CACHE_H_ | 5 #ifndef V8_COMPILATION_CACHE_H_ |
| 6 #define V8_COMPILATION_CACHE_H_ | 6 #define V8_COMPILATION_CACHE_H_ |
| 7 | 7 |
| 8 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 static const int kFirstGeneration = 0; | 27 static const int kFirstGeneration = 0; |
| 28 | 28 |
| 29 // Get the compilation cache tables for a specific generation. | 29 // Get the compilation cache tables for a specific generation. |
| 30 Handle<CompilationCacheTable> GetTable(int generation); | 30 Handle<CompilationCacheTable> GetTable(int generation); |
| 31 | 31 |
| 32 // Accessors for first generation. | 32 // Accessors for first generation. |
| 33 Handle<CompilationCacheTable> GetFirstTable() { | 33 Handle<CompilationCacheTable> GetFirstTable() { |
| 34 return GetTable(kFirstGeneration); | 34 return GetTable(kFirstGeneration); |
| 35 } | 35 } |
| 36 void SetFirstTable(Handle<CompilationCacheTable> value) { | 36 void SetFirstTable(Handle<CompilationCacheTable> value) { |
| 37 ASSERT(kFirstGeneration < generations_); | 37 DCHECK(kFirstGeneration < generations_); |
| 38 tables_[kFirstGeneration] = *value; | 38 tables_[kFirstGeneration] = *value; |
| 39 } | 39 } |
| 40 | 40 |
| 41 // Age the sub-cache by evicting the oldest generation and creating a new | 41 // Age the sub-cache by evicting the oldest generation and creating a new |
| 42 // young generation. | 42 // young generation. |
| 43 void Age(); | 43 void Age(); |
| 44 | 44 |
| 45 // GC support. | 45 // GC support. |
| 46 void Iterate(ObjectVisitor* v); | 46 void Iterate(ObjectVisitor* v); |
| 47 void IterateFunctions(ObjectVisitor* v); | 47 void IterateFunctions(ObjectVisitor* v); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 234 |
| 235 friend class Isolate; | 235 friend class Isolate; |
| 236 | 236 |
| 237 DISALLOW_COPY_AND_ASSIGN(CompilationCache); | 237 DISALLOW_COPY_AND_ASSIGN(CompilationCache); |
| 238 }; | 238 }; |
| 239 | 239 |
| 240 | 240 |
| 241 } } // namespace v8::internal | 241 } } // namespace v8::internal |
| 242 | 242 |
| 243 #endif // V8_COMPILATION_CACHE_H_ | 243 #endif // V8_COMPILATION_CACHE_H_ |
| OLD | NEW |