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

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

Issue 2622053002: Refactor snapshots pieces to include a section for loading instructions into the heap of a regular … (Closed)
Patch Set: . Created 3 years, 11 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/pages.cc ('k') | runtime/vm/raw_object.h » ('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 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 1188
1189 if (field.has_initializer()) { 1189 if (field.has_initializer()) {
1190 // Should not be in the middle of initialization while precompiling. 1190 // Should not be in the middle of initialization while precompiling.
1191 ASSERT(value.raw() != Object::transition_sentinel().raw()); 1191 ASSERT(value.raw() != Object::transition_sentinel().raw());
1192 1192
1193 if (!field.HasPrecompiledInitializer() || 1193 if (!field.HasPrecompiledInitializer() ||
1194 !Function::Handle(Z, field.PrecompiledInitializer()).HasCode()) { 1194 !Function::Handle(Z, field.PrecompiledInitializer()).HasCode()) {
1195 if (FLAG_trace_precompiler) { 1195 if (FLAG_trace_precompiler) {
1196 THR_Print("Precompiling initializer for %s\n", field.ToCString()); 1196 THR_Print("Precompiling initializer for %s\n", field.ToCString());
1197 } 1197 }
1198 ASSERT(Dart::snapshot_kind() != Snapshot::kAppAOT); 1198 ASSERT(Dart::vm_snapshot_kind() != Snapshot::kAppAOT);
1199 const Function& initializer = Function::Handle( 1199 const Function& initializer = Function::Handle(
1200 Z, CompileStaticInitializer(field, /* compute_type = */ true)); 1200 Z, CompileStaticInitializer(field, /* compute_type = */ true));
1201 ASSERT(!initializer.IsNull()); 1201 ASSERT(!initializer.IsNull());
1202 field.SetPrecompiledInitializer(initializer); 1202 field.SetPrecompiledInitializer(initializer);
1203 AddCalleesOf(initializer); 1203 AddCalleesOf(initializer);
1204 } 1204 }
1205 } 1205 }
1206 } 1206 }
1207 } 1207 }
1208 1208
(...skipping 2554 matching lines...) Expand 10 before | Expand all | Expand 10 after
3763 3763
3764 ASSERT(FLAG_precompiled_mode); 3764 ASSERT(FLAG_precompiled_mode);
3765 const bool optimized = function.IsOptimizable(); // False for natives. 3765 const bool optimized = function.IsOptimizable(); // False for natives.
3766 DartPrecompilationPipeline pipeline(zone, field_type_map); 3766 DartPrecompilationPipeline pipeline(zone, field_type_map);
3767 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3767 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3768 } 3768 }
3769 3769
3770 #endif // DART_PRECOMPILER 3770 #endif // DART_PRECOMPILER
3771 3771
3772 } // namespace dart 3772 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698