| 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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 return true; | 738 return true; |
| 739 } | 739 } |
| 740 | 740 |
| 741 MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function, | 741 MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function, |
| 742 Compiler::ConcurrencyMode mode, | 742 Compiler::ConcurrencyMode mode, |
| 743 BailoutId osr_ast_id = BailoutId::None(), | 743 BailoutId osr_ast_id = BailoutId::None(), |
| 744 JavaScriptFrame* osr_frame = nullptr) { | 744 JavaScriptFrame* osr_frame = nullptr) { |
| 745 Isolate* isolate = function->GetIsolate(); | 745 Isolate* isolate = function->GetIsolate(); |
| 746 Handle<SharedFunctionInfo> shared(function->shared(), isolate); | 746 Handle<SharedFunctionInfo> shared(function->shared(), isolate); |
| 747 | 747 |
| 748 // TODO(4764): Remove this guard once OSR graph construction works. | |
| 749 if (!osr_ast_id.IsNone() && osr_frame->is_interpreted()) { | |
| 750 return MaybeHandle<Code>(); | |
| 751 } | |
| 752 | |
| 753 Handle<Code> cached_code; | 748 Handle<Code> cached_code; |
| 754 if (GetCodeFromOptimizedCodeMap(function, osr_ast_id) | 749 if (GetCodeFromOptimizedCodeMap(function, osr_ast_id) |
| 755 .ToHandle(&cached_code)) { | 750 .ToHandle(&cached_code)) { |
| 756 if (FLAG_trace_opt) { | 751 if (FLAG_trace_opt) { |
| 757 PrintF("[found optimized code for "); | 752 PrintF("[found optimized code for "); |
| 758 function->ShortPrint(); | 753 function->ShortPrint(); |
| 759 if (!osr_ast_id.IsNone()) { | 754 if (!osr_ast_id.IsNone()) { |
| 760 PrintF(" at OSR AST id %d", osr_ast_id.ToInt()); | 755 PrintF(" at OSR AST id %d", osr_ast_id.ToInt()); |
| 761 } | 756 } |
| 762 PrintF("]\n"); | 757 PrintF("]\n"); |
| (...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 DCHECK(shared->is_compiled()); | 1911 DCHECK(shared->is_compiled()); |
| 1917 function->set_literals(cached.literals); | 1912 function->set_literals(cached.literals); |
| 1918 } else if (shared->is_compiled()) { | 1913 } else if (shared->is_compiled()) { |
| 1919 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1914 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
| 1920 JSFunction::EnsureLiterals(function); | 1915 JSFunction::EnsureLiterals(function); |
| 1921 } | 1916 } |
| 1922 } | 1917 } |
| 1923 | 1918 |
| 1924 } // namespace internal | 1919 } // namespace internal |
| 1925 } // namespace v8 | 1920 } // namespace v8 |
| OLD | NEW |