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

Unified Diff: src/factory.cc

Issue 6793013: Cache optimized code on shared function info. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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/deoptimizer.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 7dee66f6de955f76e1100f2cd1ccde8e7f1475f1..d1d6c46fe07b511880d62c9fb02981ed7037baa2 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -444,6 +444,14 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
context->global_context());
}
result->set_literals(*literals);
+ if (FLAG_cache_optimized_code) {
+ Code* code =
+ function_info->SearchOptimizedCodeMap(context->global_context());
+ if (code != NULL) {
+ result->ReplaceCode(code);
+ return result;
+ }
+ }
result->set_next_function_link(isolate()->heap()->undefined_value());
if (V8::UseCrankshaft() &&
« no previous file with comments | « src/deoptimizer.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698