Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Unified Diff: src/compilation-cache.h

Issue 10238006: Increase eval compilation cache hits. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compilation-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compilation-cache.h
diff --git a/src/compilation-cache.h b/src/compilation-cache.h
index 2f2fbadb2e5904cff99896bb38b7cbefb34e3d35..39420f713ebabfc7065302f02424db4db6c99851 100644
--- a/src/compilation-cache.h
+++ b/src/compilation-cache.h
@@ -126,14 +126,19 @@ class CompilationCacheScript : public CompilationSubCache {
// considers the following pieces of information when checking for matching
// entries:
// 1. The source string.
-// 2. The shared function info of the calling function.
+// 2. The script of the calling function.
// 3. Whether the source should be compiled as strict code or as non-strict
// code.
// Note: Currently there are clients of CompileEval that always compile
// non-strict code even if the calling function is a strict mode function.
// More specifically these are the CompileString, DebugEvaluate and
// DebugEvaluateGlobal runtime functions.
-// 4. The start position of the calling scope.
+// 4. The start position of the calling scope in the script source code.
+// Note: The script plus the start position of the calling scope uniquely
+// determine the shape of the outer scope of the eval call.
+// Note: For eval calls in global context RelocInfo::kNoPosition is always
+// used as the scope position to enable sharing between direct and indirect
+// global eval calls.
class CompilationCacheEval: public CompilationSubCache {
public:
CompilationCacheEval(Isolate* isolate, int generations)
« no previous file with comments | « no previous file | src/compilation-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698