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

Side by Side Diff: src/runtime/runtime-compiler.cc

Issue 2391533002: [turbofan] Mark for non-concurrent recompilation on OSR (Closed)
Patch Set: reword comment 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/asmjs/asm-js.h" 8 #include "src/asmjs/asm-js.h"
9 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" 9 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 if (data->OsrPcOffset()->value() >= 0) { 354 if (data->OsrPcOffset()->value() >= 0) {
355 DCHECK(BailoutId(data->OsrAstId()->value()) == ast_id); 355 DCHECK(BailoutId(data->OsrAstId()->value()) == ast_id);
356 if (FLAG_trace_osr) { 356 if (FLAG_trace_osr) {
357 PrintF("[OSR - Entry at AST id %d, offset %d in optimized code]\n", 357 PrintF("[OSR - Entry at AST id %d, offset %d in optimized code]\n",
358 ast_id.ToInt(), data->OsrPcOffset()->value()); 358 ast_id.ToInt(), data->OsrPcOffset()->value());
359 } 359 }
360 // TODO(titzer): this is a massive hack to make the deopt counts 360 // TODO(titzer): this is a massive hack to make the deopt counts
361 // match. Fix heuristics for reenabling optimizations! 361 // match. Fix heuristics for reenabling optimizations!
362 function->shared()->increment_deopt_count(); 362 function->shared()->increment_deopt_count();
363 363
364 if (!result->is_turbofanned()) { 364 if (result->is_turbofanned()) {
365 // When we're waiting for concurrent optimization, set to compile on
366 // the next call - otherwise we'd run unoptimized once more
367 // and potentially compile for OSR another time as well.
368 if (function->IsMarkedForConcurrentOptimization()) {
369 if (FLAG_trace_osr) {
370 PrintF("[OSR - Re-marking ");
371 function->PrintName();
372 PrintF(" for non-concurrent optimization]\n");
373 }
374 function->ReplaceCode(
375 isolate->builtins()->builtin(Builtins::kCompileOptimized));
376 }
377 } else {
365 // Crankshafted OSR code can be installed into the function. 378 // Crankshafted OSR code can be installed into the function.
366 function->ReplaceCode(*result); 379 function->ReplaceCode(*result);
367 } 380 }
368 return *result; 381 return *result;
369 } 382 }
370 } 383 }
371 384
372 // Failed. 385 // Failed.
373 if (FLAG_trace_osr) { 386 if (FLAG_trace_osr) {
374 PrintF("[OSR - Failed: "); 387 PrintF("[OSR - Failed: ");
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 DCHECK(is_valid_language_mode(args.smi_at(3))); 483 DCHECK(is_valid_language_mode(args.smi_at(3)));
471 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); 484 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3));
472 DCHECK(args[4]->IsSmi()); 485 DCHECK(args[4]->IsSmi());
473 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), 486 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(),
474 isolate); 487 isolate);
475 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, 488 return CompileGlobalEval(isolate, args.at<String>(1), outer_info,
476 language_mode, args.smi_at(4), args.smi_at(5)); 489 language_mode, args.smi_at(4), args.smi_at(5));
477 } 490 }
478 } // namespace internal 491 } // namespace internal
479 } // namespace v8 492 } // namespace v8
OLDNEW
« 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