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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
694 // For a given inlining-id(index) specifies the caller's inlining-id. | 694 // For a given inlining-id(index) specifies the caller's inlining-id. |
695 GrowableArray<intptr_t> caller_inline_id; | 695 GrowableArray<intptr_t> caller_inline_id; |
696 // Collect all instance fields that are loaded in the graph and | 696 // Collect all instance fields that are loaded in the graph and |
697 // have non-generic type feedback attached to them that can | 697 // have non-generic type feedback attached to them that can |
698 // potentially affect optimizations. | 698 // potentially affect optimizations. |
699 if (optimized()) { | 699 if (optimized()) { |
700 NOT_IN_PRODUCT(TimelineDurationScope tds(thread(), | 700 NOT_IN_PRODUCT(TimelineDurationScope tds(thread(), |
701 compiler_timeline, | 701 compiler_timeline, |
702 "OptimizationPasses")); | 702 "OptimizationPasses")); |
703 inline_id_to_function.Add(&function); | 703 inline_id_to_function.Add(&function); |
704 inline_id_to_token_pos.Add(function.token_pos()); | 704 // We do not add the token position now because we don't know the |
srdjan
2016/03/02 19:02:55
Maybe add comment that we expect all token positio
Cutch
2016/03/02 19:14:07
Done.
| |
705 // position of the inlined call until later. A side effect of this | |
706 // is that the length of |inline_id_to_function| is always larger | |
707 // than the length of |inline_id_to_token_pos| by one. | |
705 // Top scope function has no caller (-1). | 708 // Top scope function has no caller (-1). |
706 caller_inline_id.Add(-1); | 709 caller_inline_id.Add(-1); |
707 CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer); | 710 CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer); |
708 | 711 |
709 JitOptimizer optimizer(flow_graph); | 712 JitOptimizer optimizer(flow_graph); |
710 | 713 |
711 optimizer.ApplyICData(); | 714 optimizer.ApplyICData(); |
712 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 715 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
713 | 716 |
714 // Optimize (a << b) & c patterns, merge operations. | 717 // Optimize (a << b) & c patterns, merge operations. |
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1858 } | 1861 } |
1859 | 1862 |
1860 | 1863 |
1861 void BackgroundCompiler::EnsureInit(Thread* thread) { | 1864 void BackgroundCompiler::EnsureInit(Thread* thread) { |
1862 UNREACHABLE(); | 1865 UNREACHABLE(); |
1863 } | 1866 } |
1864 | 1867 |
1865 #endif // DART_PRECOMPILED_RUNTIME | 1868 #endif // DART_PRECOMPILED_RUNTIME |
1866 | 1869 |
1867 } // namespace dart | 1870 } // namespace dart |
OLD | NEW |