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 12 matching lines...) Expand all Loading... |
23 #include "vm/flow_graph_optimizer.h" | 23 #include "vm/flow_graph_optimizer.h" |
24 #include "vm/flow_graph_type_propagator.h" | 24 #include "vm/flow_graph_type_propagator.h" |
25 #include "vm/il_printer.h" | 25 #include "vm/il_printer.h" |
26 #include "vm/longjump.h" | 26 #include "vm/longjump.h" |
27 #include "vm/object.h" | 27 #include "vm/object.h" |
28 #include "vm/object_store.h" | 28 #include "vm/object_store.h" |
29 #include "vm/os.h" | 29 #include "vm/os.h" |
30 #include "vm/parser.h" | 30 #include "vm/parser.h" |
31 #include "vm/scanner.h" | 31 #include "vm/scanner.h" |
32 #include "vm/symbols.h" | 32 #include "vm/symbols.h" |
| 33 #include "vm/tags.h" |
33 #include "vm/timer.h" | 34 #include "vm/timer.h" |
34 | 35 |
35 namespace dart { | 36 namespace dart { |
36 | 37 |
37 DEFINE_FLAG(bool, allocation_sinking, true, | 38 DEFINE_FLAG(bool, allocation_sinking, true, |
38 "Attempt to sink temporary allocations to side exits"); | 39 "Attempt to sink temporary allocations to side exits"); |
39 DEFINE_FLAG(bool, common_subexpression_elimination, true, | 40 DEFINE_FLAG(bool, common_subexpression_elimination, true, |
40 "Do common subexpression elimination."); | 41 "Do common subexpression elimination."); |
41 DEFINE_FLAG(bool, constant_propagation, true, | 42 DEFINE_FLAG(bool, constant_propagation, true, |
42 "Do conditional constant propagation/unreachable code elimination."); | 43 "Do conditional constant propagation/unreachable code elimination."); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function, | 255 static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function, |
255 bool optimized, | 256 bool optimized, |
256 intptr_t osr_id) { | 257 intptr_t osr_id) { |
257 const Function& function = parsed_function->function(); | 258 const Function& function = parsed_function->function(); |
258 if (optimized && !function.IsOptimizable()) { | 259 if (optimized && !function.IsOptimizable()) { |
259 return false; | 260 return false; |
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(isolate, VMTag::kCompileTagId); |
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 |