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

Unified Diff: src/compiler.cc

Issue 140056: Add generations to the compilation cache for eval and regexp (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
===================================================================
--- src/compiler.cc (revision 2231)
+++ src/compiler.cc (working copy)
@@ -295,14 +295,11 @@
// The VM is in the COMPILER state until exiting this function.
VMState state(COMPILER);
- CompilationCache::Entry entry = is_global
- ? CompilationCache::EVAL_GLOBAL
- : CompilationCache::EVAL_CONTEXTUAL;
// Do a lookup in the compilation cache; if the entry is not there,
// invoke the compiler and add the result to the cache.
Handle<JSFunction> result =
- CompilationCache::LookupEval(source, context, entry);
+ CompilationCache::LookupEval(source, context, is_global);
if (result.is_null()) {
// Create a script object describing the script to be compiled.
Handle<Script> script = Factory::NewScript(source);
@@ -314,7 +311,7 @@
NULL,
NULL);
if (!result.is_null()) {
- CompilationCache::PutEval(source, context, entry, result);
+ CompilationCache::PutEval(source, context, is_global, result);
}
}
« no previous file with comments | « src/compilation-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698