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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 } | 815 } |
816 | 816 |
817 MaybeHandle<Code> GetBaselineCode(Handle<JSFunction> function) { | 817 MaybeHandle<Code> GetBaselineCode(Handle<JSFunction> function) { |
818 Isolate* isolate = function->GetIsolate(); | 818 Isolate* isolate = function->GetIsolate(); |
819 VMState<COMPILER> state(isolate); | 819 VMState<COMPILER> state(isolate); |
820 PostponeInterruptsScope postpone(isolate); | 820 PostponeInterruptsScope postpone(isolate); |
821 Zone zone(isolate->allocator(), ZONE_NAME); | 821 Zone zone(isolate->allocator(), ZONE_NAME); |
822 ParseInfo parse_info(&zone, handle(function->shared())); | 822 ParseInfo parse_info(&zone, handle(function->shared())); |
823 CompilationInfo info(&parse_info, function); | 823 CompilationInfo info(&parse_info, function); |
824 | 824 |
| 825 DCHECK(function->shared()->is_compiled()); |
| 826 |
825 // Function no longer needs to be tiered up | 827 // Function no longer needs to be tiered up |
826 function->shared()->set_marked_for_tier_up(false); | 828 function->shared()->set_marked_for_tier_up(false); |
827 | 829 |
828 // Reset profiler ticks, function is no longer considered hot. | 830 // Reset profiler ticks, function is no longer considered hot. |
829 if (function->shared()->HasBytecodeArray()) { | 831 if (function->shared()->HasBytecodeArray()) { |
830 function->shared()->set_profiler_ticks(0); | 832 function->shared()->set_profiler_ticks(0); |
831 } | 833 } |
832 | 834 |
833 // Nothing left to do if the function already has baseline code. | 835 // Nothing left to do if the function already has baseline code. |
834 if (function->shared()->code()->kind() == Code::FUNCTION) { | 836 if (function->shared()->code()->kind() == Code::FUNCTION) { |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 DCHECK(shared->is_compiled()); | 1748 DCHECK(shared->is_compiled()); |
1747 function->set_literals(cached.literals); | 1749 function->set_literals(cached.literals); |
1748 } else if (shared->is_compiled()) { | 1750 } else if (shared->is_compiled()) { |
1749 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1751 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1750 JSFunction::EnsureLiterals(function); | 1752 JSFunction::EnsureLiterals(function); |
1751 } | 1753 } |
1752 } | 1754 } |
1753 | 1755 |
1754 } // namespace internal | 1756 } // namespace internal |
1755 } // namespace v8 | 1757 } // namespace v8 |
OLD | NEW |