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

Unified Diff: src/compiler.cc

Issue 1206803003: Remove overzealous checking of --cache-optimized-code flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_opt-code-map-2
Patch Set: Rebased. Created 5 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/code-stubs-hydrogen.cc ('k') | src/heap/mark-compact.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 df209651c08451c86d0c81fe42d0ab53841ecec9..6055a59dc3fcc90102ecefe0c8bc5fa37e4f6f03 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -688,18 +688,16 @@ MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCodeCommon(
MUST_USE_RESULT static MaybeHandle<Code> GetCodeFromOptimizedCodeMap(
Handle<JSFunction> function, BailoutId osr_ast_id) {
- if (FLAG_cache_optimized_code) {
- Handle<SharedFunctionInfo> shared(function->shared());
- DisallowHeapAllocation no_gc;
- CodeAndLiterals cached = shared->SearchOptimizedCodeMap(
- function->context()->native_context(), osr_ast_id);
- if (cached.code != nullptr) {
- // Caching of optimized code enabled and optimized code found.
- if (cached.literals != nullptr) function->set_literals(cached.literals);
- DCHECK(!cached.code->marked_for_deoptimization());
- DCHECK(function->shared()->is_compiled());
- return Handle<Code>(cached.code);
- }
+ Handle<SharedFunctionInfo> shared(function->shared());
+ DisallowHeapAllocation no_gc;
+ CodeAndLiterals cached = shared->SearchOptimizedCodeMap(
+ function->context()->native_context(), osr_ast_id);
+ if (cached.code != nullptr) {
+ // Caching of optimized code enabled and optimized code found.
+ if (cached.literals != nullptr) function->set_literals(cached.literals);
+ DCHECK(!cached.code->marked_for_deoptimization());
+ DCHECK(function->shared()->is_compiled());
+ return Handle<Code>(cached.code);
}
return MaybeHandle<Code>();
}
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698