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

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: Restore --print-snapshot-sizes 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
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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 1180
1181 if (field.has_initializer()) { 1181 if (field.has_initializer()) {
1182 // Should not be in the middle of initialization while precompiling. 1182 // Should not be in the middle of initialization while precompiling.
1183 ASSERT(value.raw() != Object::transition_sentinel().raw()); 1183 ASSERT(value.raw() != Object::transition_sentinel().raw());
1184 1184
1185 if (!field.HasPrecompiledInitializer() || 1185 if (!field.HasPrecompiledInitializer() ||
1186 !Function::Handle(Z, field.PrecompiledInitializer()).HasCode()) { 1186 !Function::Handle(Z, field.PrecompiledInitializer()).HasCode()) {
1187 if (FLAG_trace_precompiler) { 1187 if (FLAG_trace_precompiler) {
1188 THR_Print("Precompiling initializer for %s\n", field.ToCString()); 1188 THR_Print("Precompiling initializer for %s\n", field.ToCString());
1189 } 1189 }
1190 ASSERT(Dart::snapshot_kind() != Snapshot::kAppAOT); 1190 ASSERT(Dart::vm_snapshot_kind() != Snapshot::kAppAOT);
1191 const Function& initializer = Function::Handle( 1191 const Function& initializer = Function::Handle(
1192 Z, CompileStaticInitializer(field, /* compute_type = */ true)); 1192 Z, CompileStaticInitializer(field, /* compute_type = */ true));
1193 ASSERT(!initializer.IsNull()); 1193 ASSERT(!initializer.IsNull());
1194 field.SetPrecompiledInitializer(initializer); 1194 field.SetPrecompiledInitializer(initializer);
1195 AddCalleesOf(initializer); 1195 AddCalleesOf(initializer);
1196 } 1196 }
1197 } 1197 }
1198 } 1198 }
1199 } 1199 }
1200 1200
(...skipping 2456 matching lines...) Expand 10 before | Expand all | Expand 10 after
3657 3657
3658 ASSERT(FLAG_precompiled_mode); 3658 ASSERT(FLAG_precompiled_mode);
3659 const bool optimized = function.IsOptimizable(); // False for natives. 3659 const bool optimized = function.IsOptimizable(); // False for natives.
3660 DartPrecompilationPipeline pipeline(zone, field_type_map); 3660 DartPrecompilationPipeline pipeline(zone, field_type_map);
3661 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3661 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3662 } 3662 }
3663 3663
3664 #endif // DART_PRECOMPILER 3664 #endif // DART_PRECOMPILER
3665 3665
3666 } // namespace dart 3666 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698