| 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 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 switch (Compiler::NextCompilationTier(*function)) { | 872 switch (Compiler::NextCompilationTier(*function)) { |
| 873 case Compiler::BASELINE: { | 873 case Compiler::BASELINE: { |
| 874 if (FLAG_trace_opt) { | 874 if (FLAG_trace_opt) { |
| 875 PrintF("[recompiling function "); | 875 PrintF("[recompiling function "); |
| 876 function->ShortPrint(); | 876 function->ShortPrint(); |
| 877 PrintF( | 877 PrintF( |
| 878 " to baseline eagerly (shared function marked for tier up)]\n"); | 878 " to baseline eagerly (shared function marked for tier up)]\n"); |
| 879 } | 879 } |
| 880 | 880 |
| 881 Handle<Code> code; | 881 Handle<Code> code; |
| 882 if (!GetBaselineCode(function).ToHandle(&code)) { | 882 if (GetBaselineCode(function).ToHandle(&code)) { |
| 883 return code; | 883 return code; |
| 884 } | 884 } |
| 885 break; | 885 break; |
| 886 } | 886 } |
| 887 case Compiler::OPTIMIZED: { | 887 case Compiler::OPTIMIZED: { |
| 888 if (FLAG_trace_opt) { | 888 if (FLAG_trace_opt) { |
| 889 PrintF("[optimizing method "); | 889 PrintF("[optimizing method "); |
| 890 function->ShortPrint(); | 890 function->ShortPrint(); |
| 891 PrintF(" eagerly (shared function marked for tier up)]\n"); | 891 PrintF(" eagerly (shared function marked for tier up)]\n"); |
| 892 } | 892 } |
| 893 | 893 |
| 894 Handle<Code> code; | 894 Handle<Code> code; |
| 895 // TODO(leszeks): Look into performing this compilation concurrently. | 895 // TODO(leszeks): Look into performing this compilation concurrently. |
| 896 if (!GetOptimizedCode(function, Compiler::NOT_CONCURRENT) | 896 if (GetOptimizedCode(function, Compiler::NOT_CONCURRENT) |
| 897 .ToHandle(&code)) { | 897 .ToHandle(&code)) { |
| 898 return code; | 898 return code; |
| 899 } | 899 } |
| 900 break; | 900 break; |
| 901 } | 901 } |
| 902 default: | 902 default: |
| 903 UNREACHABLE(); | 903 UNREACHABLE(); |
| 904 } | 904 } |
| 905 } | 905 } |
| 906 | 906 |
| 907 if (function->shared()->is_compiled()) { | 907 if (function->shared()->is_compiled()) { |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1705 DCHECK(shared->is_compiled()); | 1705 DCHECK(shared->is_compiled()); |
| 1706 function->set_literals(cached.literals); | 1706 function->set_literals(cached.literals); |
| 1707 } else if (shared->is_compiled()) { | 1707 } else if (shared->is_compiled()) { |
| 1708 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1708 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
| 1709 JSFunction::EnsureLiterals(function); | 1709 JSFunction::EnsureLiterals(function); |
| 1710 } | 1710 } |
| 1711 } | 1711 } |
| 1712 | 1712 |
| 1713 } // namespace internal | 1713 } // namespace internal |
| 1714 } // namespace v8 | 1714 } // namespace v8 |
| OLD | NEW |