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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer); | 261 TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer); |
262 bool is_compiled = false; | 262 bool is_compiled = false; |
263 Isolate* isolate = Isolate::Current(); | 263 Isolate* isolate = Isolate::Current(); |
| 264 VMTagScope tagScope(isolate, VMTag::kCompileTagId); |
264 HANDLESCOPE(isolate); | 265 HANDLESCOPE(isolate); |
265 isolate->set_cha_used(false); | 266 isolate->set_cha_used(false); |
266 | 267 |
267 // We may reattempt compilation if the function needs to be assembled using | 268 // 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, | 269 // 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 | 270 // 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 | 271 // 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 | 272 // while loop, done is set to true. use_far_branches is always false on ia32 |
272 // and x64. | 273 // and x64. |
273 bool done = false; | 274 bool done = false; |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 const Object& result = | 946 const Object& result = |
946 Object::Handle(isolate->object_store()->sticky_error()); | 947 Object::Handle(isolate->object_store()->sticky_error()); |
947 isolate->object_store()->clear_sticky_error(); | 948 isolate->object_store()->clear_sticky_error(); |
948 return result.raw(); | 949 return result.raw(); |
949 } | 950 } |
950 UNREACHABLE(); | 951 UNREACHABLE(); |
951 return Object::null(); | 952 return Object::null(); |
952 } | 953 } |
953 | 954 |
954 } // namespace dart | 955 } // namespace dart |
OLD | NEW |