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/asmjs/asm-js.h" | 9 #include "src/asmjs/asm-js.h" |
10 #include "src/asmjs/asm-typer.h" | 10 #include "src/asmjs/asm-typer.h" |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 return true; | 743 return true; |
744 } | 744 } |
745 | 745 |
746 MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function, | 746 MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function, |
747 Compiler::ConcurrencyMode mode, | 747 Compiler::ConcurrencyMode mode, |
748 BailoutId osr_ast_id = BailoutId::None(), | 748 BailoutId osr_ast_id = BailoutId::None(), |
749 JavaScriptFrame* osr_frame = nullptr) { | 749 JavaScriptFrame* osr_frame = nullptr) { |
750 Isolate* isolate = function->GetIsolate(); | 750 Isolate* isolate = function->GetIsolate(); |
751 Handle<SharedFunctionInfo> shared(function->shared(), isolate); | 751 Handle<SharedFunctionInfo> shared(function->shared(), isolate); |
752 | 752 |
| 753 // TODO(4764): Remove this guard once OSR graph construction works. |
| 754 if (!osr_ast_id.IsNone() && osr_frame->is_interpreted()) { |
| 755 return MaybeHandle<Code>(); |
| 756 } |
| 757 |
753 Handle<Code> cached_code; | 758 Handle<Code> cached_code; |
754 if (GetCodeFromOptimizedCodeMap(function, osr_ast_id) | 759 if (GetCodeFromOptimizedCodeMap(function, osr_ast_id) |
755 .ToHandle(&cached_code)) { | 760 .ToHandle(&cached_code)) { |
756 if (FLAG_trace_opt) { | 761 if (FLAG_trace_opt) { |
757 PrintF("[found optimized code for "); | 762 PrintF("[found optimized code for "); |
758 function->ShortPrint(); | 763 function->ShortPrint(); |
759 if (!osr_ast_id.IsNone()) { | 764 if (!osr_ast_id.IsNone()) { |
760 PrintF(" at OSR AST id %d", osr_ast_id.ToInt()); | 765 PrintF(" at OSR AST id %d", osr_ast_id.ToInt()); |
761 } | 766 } |
762 PrintF("]\n"); | 767 PrintF("]\n"); |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1889 DCHECK(shared->is_compiled()); | 1894 DCHECK(shared->is_compiled()); |
1890 function->set_literals(cached.literals); | 1895 function->set_literals(cached.literals); |
1891 } else if (shared->is_compiled()) { | 1896 } else if (shared->is_compiled()) { |
1892 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1897 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1893 JSFunction::EnsureLiterals(function); | 1898 JSFunction::EnsureLiterals(function); |
1894 } | 1899 } |
1895 } | 1900 } |
1896 | 1901 |
1897 } // namespace internal | 1902 } // namespace internal |
1898 } // namespace v8 | 1903 } // namespace v8 |
OLD | NEW |