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.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/deps/v8/src/compilation-cache.h b/deps/v8/src/compilation-cache.h
index 4545defc5d..3487c08a15 100644
--- a/deps/v8/src/compilation-cache.h
+++ b/deps/v8/src/compilation-cache.h
@@ -34,20 +34,9 @@ namespace internal {
// The compilation cache keeps function boilerplates for compiled
// scripts and evals. The boilerplates are looked up using the source
-// string as the key.
+// string as the key. For regular expressions the compilation data is cached.
class CompilationCache {
public:
- // The same source code string has different compiled code for
- // scripts and evals. Internally, we use separate caches to avoid
- // getting the wrong kind of entry when looking up.
- enum Entry {
- EVAL_GLOBAL,
- EVAL_CONTEXTUAL,
- REGEXP,
- SCRIPT,
- LAST_ENTRY = SCRIPT
- };
-
// Finds the script function boilerplate for a source
// string. Returns an empty handle if the cache doesn't contain a
// script for the given source string with the right origin.
@@ -61,7 +50,7 @@ class CompilationCache {
// contain a script for the given source string.
static Handle<JSFunction> LookupEval(Handle<String> source,
Handle<Context> context,
- Entry entry);
+ bool is_global);
// Returns the regexp data associated with the given regexp if it
// is in cache, otherwise an empty handle.
@@ -77,7 +66,7 @@ class CompilationCache {
// with the boilerplate. This may overwrite an existing mapping.
static void PutEval(Handle<String> source,
Handle<Context> context,
- Entry entry,
+ bool is_global,
Handle<JSFunction> boilerplate);
// Associate the (source, flags) pair to the given regexp data.