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

Side by Side Diff: runtime/vm/compiler.cc

Issue 1710443003: Fix background compilation: allocate stubs at safepoint (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Comments 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
« no previous file with comments | « no previous file | runtime/vm/stub_code.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 FLAG_trace_compiler || 1146 FLAG_trace_compiler ||
1147 (FLAG_trace_optimizing_compiler && optimized); 1147 (FLAG_trace_optimizing_compiler && optimized);
1148 Timer per_compile_timer(trace_compiler, "Compilation time"); 1148 Timer per_compile_timer(trace_compiler, "Compilation time");
1149 per_compile_timer.Start(); 1149 per_compile_timer.Start();
1150 1150
1151 ParsedFunction* parsed_function = new(zone) ParsedFunction( 1151 ParsedFunction* parsed_function = new(zone) ParsedFunction(
1152 thread, Function::ZoneHandle(zone, function.raw())); 1152 thread, Function::ZoneHandle(zone, function.raw()));
1153 if (trace_compiler) { 1153 if (trace_compiler) {
1154 const intptr_t token_size = function.end_token_pos().Pos() - 1154 const intptr_t token_size = function.end_token_pos().Pos() -
1155 function.token_pos().Pos(); 1155 function.token_pos().Pos();
1156 THR_Print("Compiling %s%sfunction: '%s' @ token %s, size %" Pd "\n", 1156 THR_Print("Compiling %s%sfunction %s: '%s' @ token %s, size %" Pd "\n",
1157 (osr_id == Compiler::kNoOSRDeoptId ? "" : "osr "), 1157 (osr_id == Compiler::kNoOSRDeoptId ? "" : "osr "),
1158 (optimized ? "optimized " : ""), 1158 (optimized ? "optimized " : ""),
1159 (Compiler::IsBackgroundCompilation() ? "(background)" : ""),
1159 function.ToFullyQualifiedCString(), 1160 function.ToFullyQualifiedCString(),
1160 function.token_pos().ToCString(), 1161 function.token_pos().ToCString(),
1161 token_size); 1162 token_size);
1162 } 1163 }
1163 INC_STAT(thread, num_functions_compiled, 1); 1164 INC_STAT(thread, num_functions_compiled, 1);
1164 if (optimized) { 1165 if (optimized) {
1165 INC_STAT(thread, num_functions_optimized, 1); 1166 INC_STAT(thread, num_functions_optimized, 1);
1166 } 1167 }
1167 { 1168 {
1168 HANDLESCOPE(thread); 1169 HANDLESCOPE(thread);
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 } 1888 }
1888 1889
1889 1890
1890 void BackgroundCompiler::EnsureInit(Thread* thread) { 1891 void BackgroundCompiler::EnsureInit(Thread* thread) {
1891 UNREACHABLE(); 1892 UNREACHABLE();
1892 } 1893 }
1893 1894
1894 #endif // DART_PRECOMPILED_RUNTIME 1895 #endif // DART_PRECOMPILED_RUNTIME
1895 1896
1896 } // namespace dart 1897 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/stub_code.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698