| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 // Notify the cache that a mark-sweep garbage collection is about to | 236 // Notify the cache that a mark-sweep garbage collection is about to |
| 237 // take place. This is used to retire entries from the cache to | 237 // take place. This is used to retire entries from the cache to |
| 238 // avoid keeping them alive too long without using them. | 238 // avoid keeping them alive too long without using them. |
| 239 void MarkCompactPrologue(); | 239 void MarkCompactPrologue(); |
| 240 | 240 |
| 241 // Enable/disable compilation cache. Used by debugger to disable compilation | 241 // Enable/disable compilation cache. Used by debugger to disable compilation |
| 242 // cache during debugging to make sure new scripts are always compiled. | 242 // cache during debugging to make sure new scripts are always compiled. |
| 243 void Enable(); | 243 void Enable(); |
| 244 void Disable(); | 244 void Disable(); |
| 245 |
| 245 private: | 246 private: |
| 246 explicit CompilationCache(Isolate* isolate); | 247 explicit CompilationCache(Isolate* isolate); |
| 247 ~CompilationCache(); | 248 ~CompilationCache(); |
| 248 | 249 |
| 249 HashMap* EagerOptimizingSet(); | 250 HashMap* EagerOptimizingSet(); |
| 250 | 251 |
| 251 // The number of sub caches covering the different types to cache. | 252 // The number of sub caches covering the different types to cache. |
| 252 static const int kSubCacheCount = 4; | 253 static const int kSubCacheCount = 4; |
| 253 | 254 |
| 254 bool IsEnabled() { return FLAG_compilation_cache && enabled_; } | 255 bool IsEnabled() { return FLAG_compilation_cache && enabled_; } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 268 | 269 |
| 269 friend class Isolate; | 270 friend class Isolate; |
| 270 | 271 |
| 271 DISALLOW_COPY_AND_ASSIGN(CompilationCache); | 272 DISALLOW_COPY_AND_ASSIGN(CompilationCache); |
| 272 }; | 273 }; |
| 273 | 274 |
| 274 | 275 |
| 275 } } // namespace v8::internal | 276 } } // namespace v8::internal |
| 276 | 277 |
| 277 #endif // V8_COMPILATION_CACHE_H_ | 278 #endif // V8_COMPILATION_CACHE_H_ |
| OLD | NEW |