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

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

Issue 1938653002: JIT precompilated snapshots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« 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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 // Should not be in the middle of initialization while precompiling. 757 // Should not be in the middle of initialization while precompiling.
758 ASSERT(value.raw() != Object::transition_sentinel().raw()); 758 ASSERT(value.raw() != Object::transition_sentinel().raw());
759 759
760 const bool is_initialized = value.raw() != Object::sentinel().raw(); 760 const bool is_initialized = value.raw() != Object::sentinel().raw();
761 if (is_initialized && !reset_fields_) return; 761 if (is_initialized && !reset_fields_) return;
762 762
763 if (!field.HasPrecompiledInitializer()) { 763 if (!field.HasPrecompiledInitializer()) {
764 if (FLAG_trace_precompiler) { 764 if (FLAG_trace_precompiler) {
765 THR_Print("Precompiling initializer for %s\n", field.ToCString()); 765 THR_Print("Precompiling initializer for %s\n", field.ToCString());
766 } 766 }
767 ASSERT(!Dart::IsRunningPrecompiledCode()); 767 ASSERT(Dart::snapshot_kind() != Snapshot::kAppNoJIT);
768 field.SetStaticValue(Instance::Handle(field.SavedInitialStaticValue())); 768 field.SetStaticValue(Instance::Handle(field.SavedInitialStaticValue()));
769 const Function& initializer = 769 const Function& initializer =
770 Function::Handle(CompileStaticInitializer(field)); 770 Function::Handle(CompileStaticInitializer(field));
771 if (!initializer.IsNull()) { 771 if (!initializer.IsNull()) {
772 field.SetPrecompiledInitializer(initializer); 772 field.SetPrecompiledInitializer(initializer);
773 } 773 }
774 } 774 }
775 775
776 const Function& function = 776 const Function& function =
777 Function::Handle(Z, field.PrecompiledInitializer()); 777 Function::Handle(Z, field.PrecompiledInitializer());
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after
2750 CompilationPipeline::New(thread->zone(), function); 2750 CompilationPipeline::New(thread->zone(), function);
2751 2751
2752 ASSERT(FLAG_precompiled_mode); 2752 ASSERT(FLAG_precompiled_mode);
2753 const bool optimized = function.IsOptimizable(); // False for natives. 2753 const bool optimized = function.IsOptimizable(); // False for natives.
2754 return PrecompileFunctionHelper(pipeline, function, optimized); 2754 return PrecompileFunctionHelper(pipeline, function, optimized);
2755 } 2755 }
2756 2756
2757 #endif // DART_PRECOMPILER 2757 #endif // DART_PRECOMPILER
2758 2758
2759 } // namespace dart 2759 } // 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