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

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

Issue 2902313004: CoreJIT snapshots without training. (Closed)
Patch Set: . Created 3 years, 7 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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 1193
1194 if (field.has_initializer()) { 1194 if (field.has_initializer()) {
1195 // Should not be in the middle of initialization while precompiling. 1195 // Should not be in the middle of initialization while precompiling.
1196 ASSERT(value.raw() != Object::transition_sentinel().raw()); 1196 ASSERT(value.raw() != Object::transition_sentinel().raw());
1197 1197
1198 if (!field.HasPrecompiledInitializer() || 1198 if (!field.HasPrecompiledInitializer() ||
1199 !Function::Handle(Z, field.PrecompiledInitializer()).HasCode()) { 1199 !Function::Handle(Z, field.PrecompiledInitializer()).HasCode()) {
1200 if (FLAG_trace_precompiler) { 1200 if (FLAG_trace_precompiler) {
1201 THR_Print("Precompiling initializer for %s\n", field.ToCString()); 1201 THR_Print("Precompiling initializer for %s\n", field.ToCString());
1202 } 1202 }
1203 ASSERT(Dart::vm_snapshot_kind() != Snapshot::kAppAOT); 1203 ASSERT(Dart::vm_snapshot_kind() != Snapshot::kFullAOT);
1204 const Function& initializer = Function::Handle( 1204 const Function& initializer = Function::Handle(
1205 Z, CompileStaticInitializer(field, /* compute_type = */ true)); 1205 Z, CompileStaticInitializer(field, /* compute_type = */ true));
1206 ASSERT(!initializer.IsNull()); 1206 ASSERT(!initializer.IsNull());
1207 field.SetPrecompiledInitializer(initializer); 1207 field.SetPrecompiledInitializer(initializer);
1208 AddCalleesOf(initializer); 1208 AddCalleesOf(initializer);
1209 } 1209 }
1210 } 1210 }
1211 } 1211 }
1212 } 1212 }
1213 1213
(...skipping 2150 matching lines...) Expand 10 before | Expand all | Expand 10 after
3364 3364
3365 ASSERT(FLAG_precompiled_mode); 3365 ASSERT(FLAG_precompiled_mode);
3366 const bool optimized = function.IsOptimizable(); // False for natives. 3366 const bool optimized = function.IsOptimizable(); // False for natives.
3367 DartPrecompilationPipeline pipeline(zone, field_type_map); 3367 DartPrecompilationPipeline pipeline(zone, field_type_map);
3368 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3368 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3369 } 3369 }
3370 3370
3371 #endif // DART_PRECOMPILER 3371 #endif // DART_PRECOMPILER
3372 3372
3373 } // namespace dart 3373 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698