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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 251 |
252 | 252 |
253 // Return false if bailed out. | 253 // Return false if bailed out. |
254 static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function, | 254 static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function, |
255 bool optimized, | 255 bool optimized, |
256 intptr_t osr_id) { | 256 intptr_t osr_id) { |
257 const Function& function = parsed_function->function(); | 257 const Function& function = parsed_function->function(); |
258 if (optimized && !function.IsOptimizable()) { | 258 if (optimized && !function.IsOptimizable()) { |
259 return false; | 259 return false; |
260 } | 260 } |
| 261 |
261 TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer); | 262 TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer); |
262 bool is_compiled = false; | 263 bool is_compiled = false; |
263 Isolate* isolate = Isolate::Current(); | 264 Isolate* isolate = Isolate::Current(); |
| 265 VMTagScope tagScope(VMTag::kCompileTagId, isolate); |
264 HANDLESCOPE(isolate); | 266 HANDLESCOPE(isolate); |
265 isolate->set_cha_used(false); | 267 isolate->set_cha_used(false); |
266 | 268 |
267 // We may reattempt compilation if the function needs to be assembled using | 269 // We may reattempt compilation if the function needs to be assembled using |
268 // far branches on ARM and MIPS. In the else branch of the setjmp call, | 270 // far branches on ARM and MIPS. In the else branch of the setjmp call, |
269 // done is set to false, and use_far_branches is set to true if there is a | 271 // done is set to false, and use_far_branches is set to true if there is a |
270 // longjmp from the ARM or MIPS assemblers. In all other paths through this | 272 // longjmp from the ARM or MIPS assemblers. In all other paths through this |
271 // while loop, done is set to true. use_far_branches is always false on ia32 | 273 // while loop, done is set to true. use_far_branches is always false on ia32 |
272 // and x64. | 274 // and x64. |
273 bool done = false; | 275 bool done = false; |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 const Object& result = | 947 const Object& result = |
946 Object::Handle(isolate->object_store()->sticky_error()); | 948 Object::Handle(isolate->object_store()->sticky_error()); |
947 isolate->object_store()->clear_sticky_error(); | 949 isolate->object_store()->clear_sticky_error(); |
948 return result.raw(); | 950 return result.raw(); |
949 } | 951 } |
950 UNREACHABLE(); | 952 UNREACHABLE(); |
951 return Object::null(); | 953 return Object::null(); |
952 } | 954 } |
953 | 955 |
954 } // namespace dart | 956 } // namespace dart |
OLD | NEW |