summaryrefslogtreecommitdiff
path: root/deps/v8/src/compilation-cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compilation-cache.h')
-rw-r--r--deps/v8/src/compilation-cache.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/deps/v8/src/compilation-cache.h b/deps/v8/src/compilation-cache.h
index 38a9e3a3a8..4545defc5d 100644
--- a/deps/v8/src/compilation-cache.h
+++ b/deps/v8/src/compilation-cache.h
@@ -28,7 +28,8 @@
#ifndef V8_COMPILATION_CACHE_H_
#define V8_COMPILATION_CACHE_H_
-namespace v8 { namespace internal {
+namespace v8 {
+namespace internal {
// The compilation cache keeps function boilerplates for compiled
@@ -40,11 +41,11 @@ class CompilationCache {
// scripts and evals. Internally, we use separate caches to avoid
// getting the wrong kind of entry when looking up.
enum Entry {
- SCRIPT,
EVAL_GLOBAL,
EVAL_CONTEXTUAL,
REGEXP,
- LAST_ENTRY = REGEXP
+ SCRIPT,
+ LAST_ENTRY = SCRIPT
};
// Finds the script function boilerplate for a source
@@ -93,10 +94,13 @@ class CompilationCache {
// Notify the cache that a mark-sweep garbage collection is about to
// take place. This is used to retire entries from the cache to
- // avoid keeping them alive too long without using them. For now, we
- // just clear the cache but we should consider are more
- // sophisticated LRU scheme.
- static void MarkCompactPrologue() { Clear(); }
+ // avoid keeping them alive too long without using them.
+ static void MarkCompactPrologue();
+
+ // Enable/disable compilation cache. Used by debugger to disable compilation
+ // cache during debugging to make sure new scripts are always compiled.
+ static void Enable();
+ static void Disable();
};