| Index: src/runtime/runtime-compiler.cc
|
| diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc
|
| index ba92faa3fafe1bca55007012429250f266be7555..0b6677a0433256df9631cb416330f7344abfc4b0 100644
|
| --- a/src/runtime/runtime-compiler.cc
|
| +++ b/src/runtime/runtime-compiler.cc
|
| @@ -219,11 +219,12 @@ RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) {
|
| BailoutId ast_id = caller_code->TranslatePcOffsetToAstId(pc_offset);
|
| DCHECK(!ast_id.IsNone());
|
|
|
| - Compiler::ConcurrencyMode mode =
|
| - isolate->concurrent_osr_enabled() &&
|
| - (function->shared()->ast_node_count() > 512)
|
| - ? Compiler::CONCURRENT
|
| - : Compiler::NOT_CONCURRENT;
|
| + // Disable concurrent OSR for asm.js, to enable frame specialization.
|
| + Compiler::ConcurrencyMode mode = (isolate->concurrent_osr_enabled() &&
|
| + !function->shared()->asm_function() &&
|
| + function->shared()->ast_node_count() > 512)
|
| + ? Compiler::CONCURRENT
|
| + : Compiler::NOT_CONCURRENT;
|
| Handle<Code> result = Handle<Code>::null();
|
|
|
| OptimizedCompileJob* job = NULL;
|
| @@ -258,8 +259,9 @@ RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) {
|
| function->PrintName();
|
| PrintF(" at AST id %d]\n", ast_id.ToInt());
|
| }
|
| - MaybeHandle<Code> maybe_result =
|
| - Compiler::GetOptimizedCode(function, caller_code, mode, ast_id);
|
| + MaybeHandle<Code> maybe_result = Compiler::GetOptimizedCode(
|
| + function, caller_code, mode, ast_id,
|
| + (mode == Compiler::NOT_CONCURRENT) ? frame : nullptr);
|
| if (maybe_result.ToHandle(&result) &&
|
| result.is_identical_to(isolate->builtins()->InOptimizationQueue())) {
|
| // Optimization is queued. Return to check later.
|
|
|