Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/compiler.cc

Issue 2172233002: [interpreter] Add explicit OSR polling bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-osr-1
Patch Set: Rebased. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/code-factory.cc ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
748 Handle<Code> cached_code; 753 Handle<Code> cached_code;
749 if (GetCodeFromOptimizedCodeMap(function, osr_ast_id) 754 if (GetCodeFromOptimizedCodeMap(function, osr_ast_id)
750 .ToHandle(&cached_code)) { 755 .ToHandle(&cached_code)) {
751 if (FLAG_trace_opt) { 756 if (FLAG_trace_opt) {
752 PrintF("[found optimized code for "); 757 PrintF("[found optimized code for ");
753 function->ShortPrint(); 758 function->ShortPrint();
754 if (!osr_ast_id.IsNone()) { 759 if (!osr_ast_id.IsNone()) {
755 PrintF(" at OSR AST id %d", osr_ast_id.ToInt()); 760 PrintF(" at OSR AST id %d", osr_ast_id.ToInt());
756 } 761 }
757 PrintF("]\n"); 762 PrintF("]\n");
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 DCHECK(shared->is_compiled()); 1916 DCHECK(shared->is_compiled());
1912 function->set_literals(cached.literals); 1917 function->set_literals(cached.literals);
1913 } else if (shared->is_compiled()) { 1918 } else if (shared->is_compiled()) {
1914 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1919 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1915 JSFunction::EnsureLiterals(function); 1920 JSFunction::EnsureLiterals(function);
1916 } 1921 }
1917 } 1922 }
1918 1923
1919 } // namespace internal 1924 } // namespace internal
1920 } // namespace v8 1925 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698