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

Unified Diff: src/compiler.cc

Issue 678843004: Use shared function info for eval cache key. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/compiler.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 535889b86bece089c41885ec39adc30cb5b48eca..520967835ab62526e175c04a91fd15874f6b172d 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1096,11 +1096,9 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
- Handle<String> source,
- Handle<Context> context,
- StrictMode strict_mode,
- ParseRestriction restriction,
- int scope_position) {
+ Handle<String> source, Handle<SharedFunctionInfo> outer_info,
+ Handle<Context> context, StrictMode strict_mode,
+ ParseRestriction restriction, int scope_position) {
Isolate* isolate = source->GetIsolate();
int source_length = source->length();
isolate->counters()->total_eval_size()->Increment(source_length);
@@ -1108,7 +1106,7 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
CompilationCache* compilation_cache = isolate->compilation_cache();
MaybeHandle<SharedFunctionInfo> maybe_shared_info =
- compilation_cache->LookupEval(source, context, strict_mode,
+ compilation_cache->LookupEval(source, outer_info, context, strict_mode,
scope_position);
Handle<SharedFunctionInfo> shared_info;
@@ -1135,8 +1133,8 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
// If caller is strict mode, the result must be in strict mode as well.
DCHECK(strict_mode == SLOPPY || shared_info->strict_mode() == STRICT);
if (!shared_info->dont_cache()) {
- compilation_cache->PutEval(
- source, context, shared_info, scope_position);
+ compilation_cache->PutEval(source, outer_info, context, shared_info,
+ scope_position);
}
}
} else if (shared_info->ic_age() != isolate->heap()->global_ic_age()) {
« no previous file with comments | « src/compiler.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698