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

Unified Diff: src/compilation-cache.cc

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 | « src/compilation-cache.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compilation-cache.cc
diff --git a/src/compilation-cache.cc b/src/compilation-cache.cc
index 82cc2231a36326a38191a95cf2c80fea3112fbff..db4ce5f2a493dbaf70a1cbf43e800742de2d4cdc 100644
--- a/src/compilation-cache.cc
+++ b/src/compilation-cache.cc
@@ -404,8 +404,9 @@ Handle<SharedFunctionInfo> CompilationCache::LookupEval(
Handle<SharedFunctionInfo> result;
if (is_global) {
+ ASSERT(context->IsGlobalContext());
result = eval_global_.Lookup(
- source, context, language_mode, scope_position);
+ source, context, language_mode, RelocInfo::kNoPosition);
} else {
ASSERT(scope_position != RelocInfo::kNoPosition);
result = eval_contextual_.Lookup(
@@ -446,7 +447,8 @@ void CompilationCache::PutEval(Handle<String> source,
HandleScope scope(isolate());
if (is_global) {
- eval_global_.Put(source, context, function_info, scope_position);
+ ASSERT(context->IsGlobalContext());
+ eval_global_.Put(source, context, function_info, RelocInfo::kNoPosition);
} else {
ASSERT(scope_position != RelocInfo::kNoPosition);
eval_contextual_.Put(source, context, function_info, scope_position);
« no previous file with comments | « src/compilation-cache.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698