Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Side by Side Diff: runtime/vm/precompiler.cc

Issue 2781483005: Improve internal compiler API so that OSR code is never installed on function. (Closed)
Patch Set: cosmetics Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698