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

Unified Diff: src/factory.cc

Issue 10103035: Share optimized code for closures. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: rebased on r11394 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
Index: src/factory.cc
===================================================================
--- src/factory.cc (revision 11394)
+++ src/factory.cc (working copy)
@@ -562,6 +562,17 @@
}
result->set_literals(*literals);
fschneider 2012/04/20 14:05:43 Instead of always allocating a new literals array,
}
+
+ 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());
fschneider 2012/04/20 14:05:43 Not needed since next_function_link is already ini
+
if (V8::UseCrankshaft() &&
FLAG_always_opt &&
result->is_compiled() &&
« no previous file with comments | « src/deoptimizer.h ('k') | src/flag-definitions.h » ('j') | src/ia32/lithium-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698