| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/precompiler.h" | 5 #include "vm/precompiler.h" |
| 6 | 6 |
| 7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/branch_optimizer.h" | 10 #include "vm/branch_optimizer.h" |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 parsed_function->AllocateVariables(); | 863 parsed_function->AllocateVariables(); |
| 864 DartPrecompilationPipeline pipeline; | 864 DartPrecompilationPipeline pipeline; |
| 865 PrecompileParsedFunctionHelper helper(parsed_function, | 865 PrecompileParsedFunctionHelper helper(parsed_function, |
| 866 /* optimized = */ true); | 866 /* optimized = */ true); |
| 867 bool success = helper.Compile(&pipeline); | 867 bool success = helper.Compile(&pipeline); |
| 868 ASSERT(success); | 868 ASSERT(success); |
| 869 | 869 |
| 870 if (compute_type && field.is_final()) { | 870 if (compute_type && field.is_final()) { |
| 871 intptr_t result_cid = pipeline.result_type().ToCid(); | 871 intptr_t result_cid = pipeline.result_type().ToCid(); |
| 872 if (result_cid != kDynamicCid) { | 872 if (result_cid != kDynamicCid) { |
| 873 if (FLAG_trace_precompiler) { | 873 if (FLAG_trace_precompiler && FLAG_support_il_printer) { |
| 874 THR_Print("Setting guarded_cid of %s to %s\n", field.ToCString(), | 874 THR_Print("Setting guarded_cid of %s to %s\n", field.ToCString(), |
| 875 pipeline.result_type().ToCString()); | 875 pipeline.result_type().ToCString()); |
| 876 } | 876 } |
| 877 field.set_guarded_cid(result_cid); | 877 field.set_guarded_cid(result_cid); |
| 878 } | 878 } |
| 879 } | 879 } |
| 880 | 880 |
| 881 if ((FLAG_disassemble || FLAG_disassemble_optimized) && | 881 if ((FLAG_disassemble || FLAG_disassemble_optimized) && |
| 882 FlowGraphPrinter::ShouldPrint(parsed_function->function())) { | 882 FlowGraphPrinter::ShouldPrint(parsed_function->function())) { |
| 883 Disassembler::DisassembleCode(parsed_function->function(), | 883 Disassembler::DisassembleCode(parsed_function->function(), |
| (...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2851 CompilationPipeline::New(thread->zone(), function); | 2851 CompilationPipeline::New(thread->zone(), function); |
| 2852 | 2852 |
| 2853 ASSERT(FLAG_precompiled_mode); | 2853 ASSERT(FLAG_precompiled_mode); |
| 2854 const bool optimized = function.IsOptimizable(); // False for natives. | 2854 const bool optimized = function.IsOptimizable(); // False for natives. |
| 2855 return PrecompileFunctionHelper(pipeline, function, optimized); | 2855 return PrecompileFunctionHelper(pipeline, function, optimized); |
| 2856 } | 2856 } |
| 2857 | 2857 |
| 2858 #endif // DART_PRECOMPILER | 2858 #endif // DART_PRECOMPILER |
| 2859 | 2859 |
| 2860 } // namespace dart | 2860 } // namespace dart |
| OLD | NEW |