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

Unified Diff: src/compiler.cc

Issue 2403453002: Revert of [turbofan] Discard the shared code entry in the optimized code map. (Closed)
Patch Set: Created 4 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/builtins/x64/builtins-x64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('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 fda139750eb2fadc7f21e15ccc00489f5ce6290d..5d0b22fd0c7d12433fe7d1e6d2e5ab84e9ff7752 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -495,6 +495,18 @@
Handle<Context> native_context(function->context()->native_context());
SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code,
literals, info->osr_ast_id());
+
+ // Do not cache (native) context-independent code compiled for OSR.
+ if (code->is_turbofanned() && info->is_osr()) return;
+
+ // Cache optimized (native) context-independent code.
+ if (FLAG_turbo_cache_shared_code && code->is_turbofanned() &&
+ !info->is_native_context_specializing()) {
+ DCHECK(!info->is_function_context_specializing());
+ DCHECK(info->osr_ast_id().IsNone());
+ Handle<SharedFunctionInfo> shared(function->shared());
+ SharedFunctionInfo::AddSharedCodeToOptimizedCodeMap(shared, code);
+ }
}
bool Renumber(ParseInfo* parse_info) {
« no previous file with comments | « src/builtins/x64/builtins-x64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698