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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 | 848 |
849 // Use propagated class-ids to create more inlining opportunities. | 849 // Use propagated class-ids to create more inlining opportunities. |
850 optimizer.ApplyClassIds(); | 850 optimizer.ApplyClassIds(); |
851 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 851 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
852 | 852 |
853 FlowGraphInliner inliner(flow_graph, | 853 FlowGraphInliner inliner(flow_graph, |
854 &inline_id_to_function, | 854 &inline_id_to_function, |
855 &inline_id_to_token_pos, | 855 &inline_id_to_token_pos, |
856 &caller_inline_id, | 856 &caller_inline_id, |
857 use_speculative_inlining, | 857 use_speculative_inlining, |
858 NULL); | 858 /*inlining_black_list=*/ NULL, |
| 859 /*precompiler=*/ NULL); |
859 inliner.Inline(); | 860 inliner.Inline(); |
860 // Use lists are maintained and validated by the inliner. | 861 // Use lists are maintained and validated by the inliner. |
861 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 862 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
862 } | 863 } |
863 | 864 |
864 // Propagate types and eliminate more type tests. | 865 // Propagate types and eliminate more type tests. |
865 FlowGraphTypePropagator::Propagate(flow_graph); | 866 FlowGraphTypePropagator::Propagate(flow_graph); |
866 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 867 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
867 | 868 |
868 { | 869 { |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1452 } | 1453 } |
1453 UNREACHABLE(); | 1454 UNREACHABLE(); |
1454 return Error::null(); | 1455 return Error::null(); |
1455 } | 1456 } |
1456 | 1457 |
1457 | 1458 |
1458 RawError* Compiler::CompileFunction(Thread* thread, | 1459 RawError* Compiler::CompileFunction(Thread* thread, |
1459 const Function& function) { | 1460 const Function& function) { |
1460 #ifdef DART_PRECOMPILER | 1461 #ifdef DART_PRECOMPILER |
1461 if (FLAG_precompiled_mode) { | 1462 if (FLAG_precompiled_mode) { |
1462 return Precompiler::CompileFunction(thread, thread->zone(), function); | 1463 return Precompiler::CompileFunction( |
| 1464 /* precompiler = */ NULL, thread, thread->zone(), function); |
1463 } | 1465 } |
1464 #endif | 1466 #endif |
1465 Isolate* isolate = thread->isolate(); | 1467 Isolate* isolate = thread->isolate(); |
1466 NOT_IN_PRODUCT( | 1468 NOT_IN_PRODUCT( |
1467 VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId); | 1469 VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId); |
1468 TIMELINE_FUNCTION_COMPILATION_DURATION(thread, "CompileFunction", function); | 1470 TIMELINE_FUNCTION_COMPILATION_DURATION(thread, "CompileFunction", function); |
1469 ) // !PRODUCT | 1471 ) // !PRODUCT |
1470 | 1472 |
1471 if (!isolate->compilation_allowed()) { | 1473 if (!isolate->compilation_allowed()) { |
1472 FATAL3("Precompilation missed function %s (%s, %s)\n", | 1474 FATAL3("Precompilation missed function %s (%s, %s)\n", |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2366 | 2368 |
2367 | 2369 |
2368 bool BackgroundCompiler::IsDisabled() { | 2370 bool BackgroundCompiler::IsDisabled() { |
2369 UNREACHABLE(); | 2371 UNREACHABLE(); |
2370 return true; | 2372 return true; |
2371 } | 2373 } |
2372 | 2374 |
2373 #endif // DART_PRECOMPILED_RUNTIME | 2375 #endif // DART_PRECOMPILED_RUNTIME |
2374 | 2376 |
2375 } // namespace dart | 2377 } // namespace dart |
OLD | NEW |