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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 .ToHandle(&cached_code)) { | 873 .ToHandle(&cached_code)) { |
874 if (FLAG_trace_opt) { | 874 if (FLAG_trace_opt) { |
875 PrintF("[found optimized code for "); | 875 PrintF("[found optimized code for "); |
876 function->ShortPrint(); | 876 function->ShortPrint(); |
877 PrintF(" during unoptimized compile]\n"); | 877 PrintF(" during unoptimized compile]\n"); |
878 } | 878 } |
879 DCHECK(function->shared()->is_compiled()); | 879 DCHECK(function->shared()->is_compiled()); |
880 return cached_code; | 880 return cached_code; |
881 } | 881 } |
882 | 882 |
883 if (function->shared()->marked_for_tier_up()) { | 883 if (function->shared()->is_compiled() && |
| 884 function->shared()->marked_for_tier_up()) { |
884 DCHECK(FLAG_mark_shared_functions_for_tier_up); | 885 DCHECK(FLAG_mark_shared_functions_for_tier_up); |
885 | 886 |
886 function->shared()->set_marked_for_tier_up(false); | 887 function->shared()->set_marked_for_tier_up(false); |
887 | 888 |
888 switch (Compiler::NextCompilationTier(*function)) { | 889 switch (Compiler::NextCompilationTier(*function)) { |
889 case Compiler::BASELINE: { | 890 case Compiler::BASELINE: { |
890 if (FLAG_trace_opt) { | 891 if (FLAG_trace_opt) { |
891 PrintF("[recompiling function "); | 892 PrintF("[recompiling function "); |
892 function->ShortPrint(); | 893 function->ShortPrint(); |
893 PrintF( | 894 PrintF( |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 DCHECK(shared->is_compiled()); | 1747 DCHECK(shared->is_compiled()); |
1747 function->set_literals(cached.literals); | 1748 function->set_literals(cached.literals); |
1748 } else if (shared->is_compiled()) { | 1749 } else if (shared->is_compiled()) { |
1749 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1750 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1750 JSFunction::EnsureLiterals(function); | 1751 JSFunction::EnsureLiterals(function); |
1751 } | 1752 } |
1752 } | 1753 } |
1753 | 1754 |
1754 } // namespace internal | 1755 } // namespace internal |
1755 } // namespace v8 | 1756 } // namespace v8 |
OLD | NEW |