| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 } | 444 } |
| 445 | 445 |
| 446 void InstallUnoptimizedCode(CompilationInfo* info) { | 446 void InstallUnoptimizedCode(CompilationInfo* info) { |
| 447 Handle<SharedFunctionInfo> shared = info->shared_info(); | 447 Handle<SharedFunctionInfo> shared = info->shared_info(); |
| 448 | 448 |
| 449 // Update the shared function info with the scope info. | 449 // Update the shared function info with the scope info. |
| 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 |
| 455 // Install coverage info on the shared function info. |
| 456 if (info->has_coverage_info()) { |
| 457 DCHECK(info->is_block_coverage_enabled()); |
| 458 info->isolate()->debug()->InstallCoverageInfo(info->shared_info(), |
| 459 info->coverage_info()); |
| 460 } |
| 454 } | 461 } |
| 455 | 462 |
| 456 CompilationJob::Status FinalizeUnoptimizedCompilationJob(CompilationJob* job) { | 463 CompilationJob::Status FinalizeUnoptimizedCompilationJob(CompilationJob* job) { |
| 457 CompilationJob::Status status = job->FinalizeJob(); | 464 CompilationJob::Status status = job->FinalizeJob(); |
| 458 if (status == CompilationJob::SUCCEEDED) { | 465 if (status == CompilationJob::SUCCEEDED) { |
| 459 CompilationInfo* info = job->info(); | 466 CompilationInfo* info = job->info(); |
| 460 EnsureFeedbackMetadata(info); | 467 EnsureFeedbackMetadata(info); |
| 461 DCHECK(!info->code().is_null()); | 468 DCHECK(!info->code().is_null()); |
| 462 if (info->parse_info()->literal()->should_be_used_once_hint()) { | 469 if (info->parse_info()->literal()->should_be_used_once_hint()) { |
| 463 info->code()->MarkToBeExecutedOnce(info->isolate()); | 470 info->code()->MarkToBeExecutedOnce(info->isolate()); |
| (...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 // Caching of optimized code enabled and optimized code found. | 1905 // Caching of optimized code enabled and optimized code found. |
| 1899 DCHECK(!code->marked_for_deoptimization()); | 1906 DCHECK(!code->marked_for_deoptimization()); |
| 1900 DCHECK(function->shared()->is_compiled()); | 1907 DCHECK(function->shared()->is_compiled()); |
| 1901 function->ReplaceCode(code); | 1908 function->ReplaceCode(code); |
| 1902 } | 1909 } |
| 1903 } | 1910 } |
| 1904 } | 1911 } |
| 1905 | 1912 |
| 1906 } // namespace internal | 1913 } // namespace internal |
| 1907 } // namespace v8 | 1914 } // namespace v8 |
| OLD | NEW |