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 | 8 |
9 #include "src/ast/ast-numbering.h" | 9 #include "src/ast/ast-numbering.h" |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 | 768 |
769 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); | 769 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); |
770 TRACE_EVENT0("v8", "V8.RecompileSynchronous"); | 770 TRACE_EVENT0("v8", "V8.RecompileSynchronous"); |
771 | 771 |
772 if (job->CreateGraph() != OptimizedCompileJob::SUCCEEDED) return false; | 772 if (job->CreateGraph() != OptimizedCompileJob::SUCCEEDED) return false; |
773 isolate->optimizing_compile_dispatcher()->QueueForOptimization(job); | 773 isolate->optimizing_compile_dispatcher()->QueueForOptimization(job); |
774 | 774 |
775 if (FLAG_trace_concurrent_recompilation) { | 775 if (FLAG_trace_concurrent_recompilation) { |
776 PrintF(" ** Queued "); | 776 PrintF(" ** Queued "); |
777 info->closure()->ShortPrint(); | 777 info->closure()->ShortPrint(); |
778 if (info->is_osr()) { | 778 PrintF(" for concurrent optimization.\n"); |
779 PrintF(" for concurrent OSR at %d.\n", info->osr_ast_id().ToInt()); | |
780 } else { | |
781 PrintF(" for concurrent optimization.\n"); | |
782 } | |
783 } | 779 } |
784 return true; | 780 return true; |
785 } | 781 } |
786 | 782 |
787 MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function, | 783 MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function, |
788 Compiler::ConcurrencyMode mode, | 784 Compiler::ConcurrencyMode mode, |
789 BailoutId osr_ast_id = BailoutId::None(), | 785 BailoutId osr_ast_id = BailoutId::None(), |
790 JavaScriptFrame* osr_frame = nullptr) { | 786 JavaScriptFrame* osr_frame = nullptr) { |
791 Isolate* isolate = function->GetIsolate(); | 787 Isolate* isolate = function->GetIsolate(); |
792 Handle<SharedFunctionInfo> shared(function->shared(), isolate); | 788 Handle<SharedFunctionInfo> shared(function->shared(), isolate); |
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 MaybeHandle<Code> code; | 1675 MaybeHandle<Code> code; |
1680 if (cached.code != nullptr) code = handle(cached.code); | 1676 if (cached.code != nullptr) code = handle(cached.code); |
1681 Handle<Context> native_context(function->context()->native_context()); | 1677 Handle<Context> native_context(function->context()->native_context()); |
1682 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, | 1678 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, |
1683 literals, BailoutId::None()); | 1679 literals, BailoutId::None()); |
1684 } | 1680 } |
1685 } | 1681 } |
1686 | 1682 |
1687 } // namespace internal | 1683 } // namespace internal |
1688 } // namespace v8 | 1684 } // namespace v8 |
OLD | NEW |