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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 switch (Compiler::NextCompilationTier(*function)) { | 970 switch (Compiler::NextCompilationTier(*function)) { |
971 case Compiler::BASELINE: { | 971 case Compiler::BASELINE: { |
972 if (FLAG_trace_opt) { | 972 if (FLAG_trace_opt) { |
973 PrintF("[recompiling function "); | 973 PrintF("[recompiling function "); |
974 function->ShortPrint(); | 974 function->ShortPrint(); |
975 PrintF( | 975 PrintF( |
976 " to baseline eagerly (shared function marked for tier up)]\n"); | 976 " to baseline eagerly (shared function marked for tier up)]\n"); |
977 } | 977 } |
978 | 978 |
979 Handle<Code> code; | 979 Handle<Code> code; |
980 if (!GetBaselineCode(function).ToHandle(&code)) { | 980 if (GetBaselineCode(function).ToHandle(&code)) { |
981 return code; | 981 return code; |
982 } | 982 } |
983 break; | 983 break; |
984 } | 984 } |
985 case Compiler::OPTIMIZED: { | 985 case Compiler::OPTIMIZED: { |
986 if (FLAG_trace_opt) { | 986 if (FLAG_trace_opt) { |
987 PrintF("[optimizing method "); | 987 PrintF("[optimizing method "); |
988 function->ShortPrint(); | 988 function->ShortPrint(); |
989 PrintF(" eagerly (shared function marked for tier up)]\n"); | 989 PrintF(" eagerly (shared function marked for tier up)]\n"); |
990 } | 990 } |
991 | 991 |
992 Handle<Code> code; | 992 Handle<Code> code; |
993 // TODO(leszeks): Look into performing this compilation concurrently. | 993 // TODO(leszeks): Look into performing this compilation concurrently. |
994 if (!GetOptimizedCode(function, Compiler::NOT_CONCURRENT) | 994 if (GetOptimizedCode(function, Compiler::NOT_CONCURRENT) |
995 .ToHandle(&code)) { | 995 .ToHandle(&code)) { |
996 return code; | 996 return code; |
997 } | 997 } |
998 break; | 998 break; |
999 } | 999 } |
1000 default: | 1000 default: |
1001 UNREACHABLE(); | 1001 UNREACHABLE(); |
1002 } | 1002 } |
1003 } | 1003 } |
1004 | 1004 |
1005 if (function->shared()->is_compiled()) { | 1005 if (function->shared()->is_compiled()) { |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1824 DCHECK(shared->is_compiled()); | 1824 DCHECK(shared->is_compiled()); |
1825 function->set_literals(cached.literals); | 1825 function->set_literals(cached.literals); |
1826 } else if (shared->is_compiled()) { | 1826 } else if (shared->is_compiled()) { |
1827 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1827 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1828 JSFunction::EnsureLiterals(function); | 1828 JSFunction::EnsureLiterals(function); |
1829 } | 1829 } |
1830 } | 1830 } |
1831 | 1831 |
1832 } // namespace internal | 1832 } // namespace internal |
1833 } // namespace v8 | 1833 } // namespace v8 |
OLD | NEW |