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 2913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2924 // after generating unoptimized code. | 2924 // after generating unoptimized code. |
2925 function.set_usage_counter(INT_MIN); | 2925 function.set_usage_counter(INT_MIN); |
2926 } | 2926 } |
2927 | 2927 |
2928 graph_compiler->FinalizePcDescriptors(code); | 2928 graph_compiler->FinalizePcDescriptors(code); |
2929 code.set_deopt_info_array(deopt_info_array); | 2929 code.set_deopt_info_array(deopt_info_array); |
2930 | 2930 |
2931 graph_compiler->FinalizeStackMaps(code); | 2931 graph_compiler->FinalizeStackMaps(code); |
2932 graph_compiler->FinalizeVarDescriptors(code); | 2932 graph_compiler->FinalizeVarDescriptors(code); |
2933 graph_compiler->FinalizeExceptionHandlers(code); | 2933 graph_compiler->FinalizeExceptionHandlers(code); |
2934 graph_compiler->FinalizeCatchEntryStateMap(code); | |
2935 graph_compiler->FinalizeStaticCallTargetsTable(code); | 2934 graph_compiler->FinalizeStaticCallTargetsTable(code); |
2936 graph_compiler->FinalizeCodeSourceMap(code); | 2935 graph_compiler->FinalizeCodeSourceMap(code); |
2937 | 2936 |
2938 if (optimized()) { | 2937 if (optimized()) { |
2939 // Installs code while at safepoint. | 2938 // Installs code while at safepoint. |
2940 ASSERT(thread()->IsMutatorThread()); | 2939 ASSERT(thread()->IsMutatorThread()); |
2941 function.InstallOptimizedCode(code, /* is_osr = */ false); | 2940 function.InstallOptimizedCode(code, /* is_osr = */ false); |
2942 } else { // not optimized. | 2941 } else { // not optimized. |
2943 function.set_unoptimized_code(code); | 2942 function.set_unoptimized_code(code); |
2944 function.AttachCode(code); | 2943 function.AttachCode(code); |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3556 | 3555 |
3557 ASSERT(FLAG_precompiled_mode); | 3556 ASSERT(FLAG_precompiled_mode); |
3558 const bool optimized = function.IsOptimizable(); // False for natives. | 3557 const bool optimized = function.IsOptimizable(); // False for natives. |
3559 DartPrecompilationPipeline pipeline(zone, field_type_map); | 3558 DartPrecompilationPipeline pipeline(zone, field_type_map); |
3560 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); | 3559 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); |
3561 } | 3560 } |
3562 | 3561 |
3563 #endif // DART_PRECOMPILER | 3562 #endif // DART_PRECOMPILER |
3564 | 3563 |
3565 } // namespace dart | 3564 } // namespace dart |
OLD | NEW |