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 2928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2939 graph_compiler->FinalizeStackMaps(code); | 2939 graph_compiler->FinalizeStackMaps(code); |
2940 graph_compiler->FinalizeVarDescriptors(code); | 2940 graph_compiler->FinalizeVarDescriptors(code); |
2941 graph_compiler->FinalizeExceptionHandlers(code); | 2941 graph_compiler->FinalizeExceptionHandlers(code); |
2942 graph_compiler->FinalizeCatchEntryStateMap(code); | 2942 graph_compiler->FinalizeCatchEntryStateMap(code); |
2943 graph_compiler->FinalizeStaticCallTargetsTable(code); | 2943 graph_compiler->FinalizeStaticCallTargetsTable(code); |
2944 graph_compiler->FinalizeCodeSourceMap(code); | 2944 graph_compiler->FinalizeCodeSourceMap(code); |
2945 | 2945 |
2946 if (optimized()) { | 2946 if (optimized()) { |
2947 // Installs code while at safepoint. | 2947 // Installs code while at safepoint. |
2948 ASSERT(thread()->IsMutatorThread()); | 2948 ASSERT(thread()->IsMutatorThread()); |
2949 function.InstallOptimizedCode(code, /* is_osr = */ false); | 2949 function.InstallOptimizedCode(code); |
2950 } else { // not optimized. | 2950 } else { // not optimized. |
2951 function.set_unoptimized_code(code); | 2951 function.set_unoptimized_code(code); |
2952 function.AttachCode(code); | 2952 function.AttachCode(code); |
2953 } | 2953 } |
2954 ASSERT(!parsed_function()->HasDeferredPrefixes()); | 2954 ASSERT(!parsed_function()->HasDeferredPrefixes()); |
2955 ASSERT(FLAG_load_deferred_eagerly); | 2955 ASSERT(FLAG_load_deferred_eagerly); |
2956 } | 2956 } |
2957 | 2957 |
2958 | 2958 |
2959 // Return false if bailed out. | 2959 // Return false if bailed out. |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3565 | 3565 |
3566 ASSERT(FLAG_precompiled_mode); | 3566 ASSERT(FLAG_precompiled_mode); |
3567 const bool optimized = function.IsOptimizable(); // False for natives. | 3567 const bool optimized = function.IsOptimizable(); // False for natives. |
3568 DartPrecompilationPipeline pipeline(zone, field_type_map); | 3568 DartPrecompilationPipeline pipeline(zone, field_type_map); |
3569 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); | 3569 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); |
3570 } | 3570 } |
3571 | 3571 |
3572 #endif // DART_PRECOMPILER | 3572 #endif // DART_PRECOMPILER |
3573 | 3573 |
3574 } // namespace dart | 3574 } // namespace dart |
OLD | NEW |