| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 // potentially affect optimizations. | 329 // potentially affect optimizations. |
| 330 if (optimized) { | 330 if (optimized) { |
| 331 TimerScope timer(FLAG_compiler_stats, | 331 TimerScope timer(FLAG_compiler_stats, |
| 332 &CompilerStats::graphoptimizer_timer, | 332 &CompilerStats::graphoptimizer_timer, |
| 333 isolate); | 333 isolate); |
| 334 | 334 |
| 335 FlowGraphOptimizer optimizer(flow_graph); | 335 FlowGraphOptimizer optimizer(flow_graph); |
| 336 optimizer.ApplyICData(); | 336 optimizer.ApplyICData(); |
| 337 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 337 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 338 | 338 |
| 339 // Optimize (a << b) & c patterns. Must occur before | 339 // Optimize (a << b) & c patterns, merge truncdiv/mod. Must occur before |
| 340 // 'SelectRepresentations' which inserts conversion nodes. | 340 // 'SelectRepresentations' which inserts conversion nodes. |
| 341 // TODO(srdjan): Moved before inlining until environment use list can | 341 // TODO(srdjan): Moved before inlining until environment use list can |
| 342 // be used to detect when shift-left is outside the scope of bit-and. | 342 // be used to detect when shift-left is outside the scope of bit-and. |
| 343 optimizer.TryOptimizeLeftShiftWithBitAndPattern(); | 343 optimizer.TryOptimizePatterns(); |
| 344 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 344 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 345 | 345 |
| 346 // Inlining (mutates the flow graph) | 346 // Inlining (mutates the flow graph) |
| 347 if (FLAG_use_inlining) { | 347 if (FLAG_use_inlining) { |
| 348 TimerScope timer(FLAG_compiler_stats, | 348 TimerScope timer(FLAG_compiler_stats, |
| 349 &CompilerStats::graphinliner_timer); | 349 &CompilerStats::graphinliner_timer); |
| 350 // Propagate types to create more inlining opportunities. | 350 // Propagate types to create more inlining opportunities. |
| 351 FlowGraphTypePropagator::Propagate(flow_graph); | 351 FlowGraphTypePropagator::Propagate(flow_graph); |
| 352 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 352 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 353 | 353 |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 Object::Handle(isolate->object_store()->sticky_error()); | 928 Object::Handle(isolate->object_store()->sticky_error()); |
| 929 isolate->object_store()->clear_sticky_error(); | 929 isolate->object_store()->clear_sticky_error(); |
| 930 isolate->set_long_jump_base(base); | 930 isolate->set_long_jump_base(base); |
| 931 return result.raw(); | 931 return result.raw(); |
| 932 } | 932 } |
| 933 UNREACHABLE(); | 933 UNREACHABLE(); |
| 934 return Object::null(); | 934 return Object::null(); |
| 935 } | 935 } |
| 936 | 936 |
| 937 } // namespace dart | 937 } // namespace dart |
| OLD | NEW |