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

Unified Diff: src/compiler.cc

Issue 2798293002: [turbofan] Allow to reuse OSR code objects. (Closed)
Patch Set: Address comment from Michi. Created 3 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
« no previous file with comments | « no previous file | no next file » | 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 2176e55d50a99a97bd2a60cd74f1212db3d768cd..1424a299776c1184f312d96229ec721ef3d74303 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -733,10 +733,6 @@ void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) {
// Frame specialization implies function context specialization.
DCHECK(!info->is_frame_specializing());
- // TODO(4764): When compiling for OSR from bytecode, BailoutId might derive
- // from bytecode offset and overlap with actual BailoutId. No caching!
- if (info->is_osr() && info->is_optimizing_from_bytecode()) return;
-
// Cache optimized context-specific code.
Handle<JSFunction> function = info->closure();
Handle<SharedFunctionInfo> shared(function->shared());
@@ -852,10 +848,7 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
DCHECK_IMPLIES(ignition_osr, FLAG_ignition_osr);
Handle<Code> cached_code;
- // TODO(4764): When compiling for OSR from bytecode, BailoutId might derive
- // from bytecode offset and overlap with actual BailoutId. No lookup!
- if (!ignition_osr &&
- GetCodeFromOptimizedCodeMap(function, osr_ast_id)
+ if (GetCodeFromOptimizedCodeMap(function, osr_ast_id)
.ToHandle(&cached_code)) {
if (FLAG_trace_opt) {
PrintF("[found optimized code for ");
@@ -919,7 +912,6 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
// TurboFan can optimize directly from existing bytecode.
if (use_turbofan && ShouldUseIgnition(info)) {
- if (info->is_osr() && !ignition_osr) return MaybeHandle<Code>();
DCHECK(shared->HasBytecodeArray());
info->MarkAsOptimizeFromBytecode();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698