OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/compiler.h" | 5 #include "src/compiler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/asmjs/asm-js.h" | 10 #include "src/asmjs/asm-js.h" |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
450 InstallSharedScopeInfo(info, shared); | 450 InstallSharedScopeInfo(info, shared); |
451 | 451 |
452 // Install compilation result on the shared function info | 452 // Install compilation result on the shared function info |
453 InstallSharedCompilationResult(info, shared); | 453 InstallSharedCompilationResult(info, shared); |
454 } | 454 } |
455 | 455 |
456 CompilationJob::Status FinalizeUnoptimizedCompilationJob(CompilationJob* job) { | 456 CompilationJob::Status FinalizeUnoptimizedCompilationJob(CompilationJob* job) { |
457 CompilationJob::Status status = job->FinalizeJob(); | 457 CompilationJob::Status status = job->FinalizeJob(); |
458 if (status == CompilationJob::SUCCEEDED) { | 458 if (status == CompilationJob::SUCCEEDED) { |
459 CompilationInfo* info = job->info(); | 459 CompilationInfo* info = job->info(); |
460 Isolate* isolate = info->isolate(); | |
460 EnsureFeedbackMetadata(info); | 461 EnsureFeedbackMetadata(info); |
462 if (info->has_coverage_info()) { | |
463 DCHECK(info->is_block_coverage_enabled()); | |
464 isolate->debug()->InstallCoverageInfo(info->shared_info(), | |
465 info->coverage_info()); | |
466 } | |
rmcilroy
2017/06/01 14:01:50
nit - maybe do this in InstallUnoptimizedCode simi
jgruber
2017/06/02 06:39:27
Done.
| |
461 DCHECK(!info->code().is_null()); | 467 DCHECK(!info->code().is_null()); |
462 if (info->parse_info()->literal()->should_be_used_once_hint()) { | 468 if (info->parse_info()->literal()->should_be_used_once_hint()) { |
463 info->code()->MarkToBeExecutedOnce(info->isolate()); | 469 info->code()->MarkToBeExecutedOnce(isolate); |
464 } | 470 } |
465 InstallUnoptimizedCode(info); | 471 InstallUnoptimizedCode(info); |
466 RecordFunctionCompilation(CodeEventListener::FUNCTION_TAG, info); | 472 RecordFunctionCompilation(CodeEventListener::FUNCTION_TAG, info); |
467 job->RecordUnoptimizedCompilationStats(); | 473 job->RecordUnoptimizedCompilationStats(); |
468 } | 474 } |
469 return status; | 475 return status; |
470 } | 476 } |
471 | 477 |
472 void SetSharedFunctionFlagsFromLiteral(FunctionLiteral* literal, | 478 void SetSharedFunctionFlagsFromLiteral(FunctionLiteral* literal, |
473 Handle<SharedFunctionInfo> shared_info) { | 479 Handle<SharedFunctionInfo> shared_info) { |
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1898 // Caching of optimized code enabled and optimized code found. | 1904 // Caching of optimized code enabled and optimized code found. |
1899 DCHECK(!code->marked_for_deoptimization()); | 1905 DCHECK(!code->marked_for_deoptimization()); |
1900 DCHECK(function->shared()->is_compiled()); | 1906 DCHECK(function->shared()->is_compiled()); |
1901 function->ReplaceCode(code); | 1907 function->ReplaceCode(code); |
1902 } | 1908 } |
1903 } | 1909 } |
1904 } | 1910 } |
1905 | 1911 |
1906 } // namespace internal | 1912 } // namespace internal |
1907 } // namespace v8 | 1913 } // namespace v8 |
OLD | NEW |