OLD | NEW |
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function, | 257 static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function, |
258 bool optimized, | 258 bool optimized, |
259 intptr_t osr_id) { | 259 intptr_t osr_id) { |
260 const Function& function = parsed_function->function(); | 260 const Function& function = parsed_function->function(); |
261 if (optimized && !function.IsOptimizable()) { | 261 if (optimized && !function.IsOptimizable()) { |
262 return false; | 262 return false; |
263 } | 263 } |
264 TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer); | 264 TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer); |
265 bool is_compiled = false; | 265 bool is_compiled = false; |
266 Isolate* isolate = Isolate::Current(); | 266 Isolate* isolate = Isolate::Current(); |
267 VMTagScope tagScope(isolate, VMTag::kCompileTagId); | 267 const intptr_t compiler_tag = optimized ? VMTag::kCompileOptimizedTagId : |
| 268 VMTag::kCompileUnoptimizedTagId; |
| 269 VMTagScope tagScope(isolate, compiler_tag); |
268 HANDLESCOPE(isolate); | 270 HANDLESCOPE(isolate); |
269 isolate->set_cha_used(false); | 271 isolate->set_cha_used(false); |
270 | 272 |
271 // We may reattempt compilation if the function needs to be assembled using | 273 // We may reattempt compilation if the function needs to be assembled using |
272 // far branches on ARM and MIPS. In the else branch of the setjmp call, | 274 // far branches on ARM and MIPS. In the else branch of the setjmp call, |
273 // done is set to false, and use_far_branches is set to true if there is a | 275 // done is set to false, and use_far_branches is set to true if there is a |
274 // longjmp from the ARM or MIPS assemblers. In all other paths through this | 276 // longjmp from the ARM or MIPS assemblers. In all other paths through this |
275 // while loop, done is set to true. use_far_branches is always false on ia32 | 277 // while loop, done is set to true. use_far_branches is always false on ia32 |
276 // and x64. | 278 // and x64. |
277 bool done = false; | 279 bool done = false; |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 const Object& result = | 988 const Object& result = |
987 Object::Handle(isolate->object_store()->sticky_error()); | 989 Object::Handle(isolate->object_store()->sticky_error()); |
988 isolate->object_store()->clear_sticky_error(); | 990 isolate->object_store()->clear_sticky_error(); |
989 return result.raw(); | 991 return result.raw(); |
990 } | 992 } |
991 UNREACHABLE(); | 993 UNREACHABLE(); |
992 return Object::null(); | 994 return Object::null(); |
993 } | 995 } |
994 | 996 |
995 } // namespace dart | 997 } // namespace dart |
OLD | NEW |