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