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 1685633002: [interpreter] CompilationInfo::unoptimized_code only for OSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-pipeline-1
Patch Set: Remove thingie. Created 4 years, 10 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
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 8
9 #include "src/ast/ast-numbering.h" 9 #include "src/ast/ast-numbering.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 // If the debugger is active, do not compile with turbofan unless we can 1017 // If the debugger is active, do not compile with turbofan unless we can
1018 // deopt from turbofan code. 1018 // deopt from turbofan code.
1019 if (FLAG_turbo_asm && function->shared()->asm_function() && 1019 if (FLAG_turbo_asm && function->shared()->asm_function() &&
1020 (FLAG_turbo_asm_deoptimization || !isolate->debug()->is_active()) && 1020 (FLAG_turbo_asm_deoptimization || !isolate->debug()->is_active()) &&
1021 !FLAG_turbo_osr) { 1021 !FLAG_turbo_osr) {
1022 CompilationInfoWithZone info(function); 1022 CompilationInfoWithZone info(function);
1023 1023
1024 VMState<COMPILER> state(isolate); 1024 VMState<COMPILER> state(isolate);
1025 PostponeInterruptsScope postpone(isolate); 1025 PostponeInterruptsScope postpone(isolate);
1026 1026
1027 info.SetOptimizing(BailoutId::None(), handle(function->shared()->code())); 1027 info.SetOptimizing();
1028 1028
1029 if (GetOptimizedCodeNow(&info)) { 1029 if (GetOptimizedCodeNow(&info)) {
1030 DCHECK(function->shared()->is_compiled()); 1030 DCHECK(function->shared()->is_compiled());
1031 return info.code(); 1031 return info.code();
1032 } 1032 }
1033 // We have failed compilation. If there was an exception clear it so that 1033 // We have failed compilation. If there was an exception clear it so that
1034 // we can compile unoptimized code. 1034 // we can compile unoptimized code.
1035 if (isolate->has_pending_exception()) isolate->clear_pending_exception(); 1035 if (isolate->has_pending_exception()) isolate->clear_pending_exception();
1036 } 1036 }
1037 1037
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 } 1868 }
1869 1869
1870 #if DEBUG 1870 #if DEBUG
1871 void CompilationInfo::PrintAstForTesting() { 1871 void CompilationInfo::PrintAstForTesting() {
1872 PrintF("--- Source from AST ---\n%s\n", 1872 PrintF("--- Source from AST ---\n%s\n",
1873 PrettyPrinter(isolate()).PrintProgram(literal())); 1873 PrettyPrinter(isolate()).PrintProgram(literal()));
1874 } 1874 }
1875 #endif 1875 #endif
1876 } // namespace internal 1876 } // namespace internal
1877 } // namespace v8 1877 } // namespace v8
OLDNEW
« src/compiler.h ('K') | « src/compiler.h ('k') | test/cctest/compiler/function-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698