summaryrefslogtreecommitdiff
path: root/deps/v8/src/compilation-cache.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2009-10-16 14:05:12 +0200
committerRyan Dahl <ry@tinyclouds.org>2009-10-16 14:30:27 +0200
commit8e6d978bba0f3c52b297573157e4547ed9d291d1 (patch)
treeb568b8d396ea5c57c60bd26bff536baa84d2b872 /deps/v8/src/compilation-cache.cc
parent5f82c4baf0e5aadb86f6bfc7f54f8e534ae0338a (diff)
downloadandroid-node-v8-8e6d978bba0f3c52b297573157e4547ed9d291d1.tar.gz
android-node-v8-8e6d978bba0f3c52b297573157e4547ed9d291d1.tar.bz2
android-node-v8-8e6d978bba0f3c52b297573157e4547ed9d291d1.zip
Upgrade v8 to 1.3.16
and apply my V8 patch for debugging.
Diffstat (limited to 'deps/v8/src/compilation-cache.cc')
-rw-r--r--deps/v8/src/compilation-cache.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/deps/v8/src/compilation-cache.cc b/deps/v8/src/compilation-cache.cc
index 8dd9ec16b2..54273673a0 100644
--- a/deps/v8/src/compilation-cache.cc
+++ b/deps/v8/src/compilation-cache.cc
@@ -43,20 +43,22 @@ static const int kEvalGlobalGenerations = 1;
static const int kEvalContextualGenerations = 1;
static const int kRegExpGenerations = 1;
#else
+// The number of ScriptGenerations is carefully chosen based on histograms.
+// See issue 458: http://code.google.com/p/v8/issues/detail?id=458
static const int kScriptGenerations = 5;
static const int kEvalGlobalGenerations = 2;
static const int kEvalContextualGenerations = 2;
static const int kRegExpGenerations = 2;
#endif
-// Initial of each compilation cache table allocated.
+// Initial size of each compilation cache table allocated.
static const int kInitialCacheSize = 64;
// The compilation cache consists of several generational sub-caches which uses
// this class as a base class. A sub-cache contains a compilation cache tables
-// for each generation of the sub-cache. As the same source code string has
-// different compiled code for scripts and evals. Internally, we use separate
-// sub-caches to avoid getting the wrong kind of result when looking up.
+// for each generation of the sub-cache. Since the same source code string has
+// different compiled code for scripts and evals, we use separate sub-caches
+// for different compilation modes, to avoid retrieving the wrong result.
class CompilationSubCache {
public:
explicit CompilationSubCache(int generations): generations_(generations) {