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

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

Issue 1311403009: More precompiled snapshotting. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 5 years, 3 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/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/log.h" 9 #include "vm/log.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 432
433 void Precompiler::AddField(const Field& field) { 433 void Precompiler::AddField(const Field& field) {
434 if (field.is_static()) { 434 if (field.is_static()) {
435 // Potential const object. Uninitialized field will harmlessly do a 435 // Potential const object. Uninitialized field will harmlessly do a
436 // redundant add of the Null class. 436 // redundant add of the Null class.
437 const Object& value = Object::Handle(Z, field.StaticValue()); 437 const Object& value = Object::Handle(Z, field.StaticValue());
438 const Class& cls = Class::Handle(Z, value.clazz()); 438 const Class& cls = Class::Handle(Z, value.clazz());
439 AddClass(cls); 439 AddClass(cls);
440 440
441 if (field.has_initializer()) { 441 if (field.has_initializer()) {
442 if (field.PrecompiledInitializer() != Function::null()) return; 442 if (field.HasPrecompiledInitializer()) return;
443 443
444 if (FLAG_trace_precompiler) { 444 if (FLAG_trace_precompiler) {
445 THR_Print("Precompiling initializer for %s\n", field.ToCString()); 445 THR_Print("Precompiling initializer for %s\n", field.ToCString());
446 } 446 }
siva 2015/09/14 20:32:59 can we assert here that Object::instructions_snaps
rmacnak 2015/09/15 17:56:42 Done.
447 field.SetStaticValue(Instance::Handle(field.SavedInitialStaticValue()));
447 Compiler::CompileStaticInitializer(field); 448 Compiler::CompileStaticInitializer(field);
448 449
449 const Function& function = 450 const Function& function =
450 Function::Handle(Z, field.PrecompiledInitializer()); 451 Function::Handle(Z, field.PrecompiledInitializer());
451 AddCalleesOf(function); 452 AddCalleesOf(function);
452 } 453 }
453 } 454 }
454 } 455 }
455 456
456 457
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 for (intptr_t j = 0; j < closures.Length(); j++) { 633 for (intptr_t j = 0; j < closures.Length(); j++) {
633 function ^= closures.At(j); 634 function ^= closures.At(j);
634 ASSERT(function.HasCode()); 635 ASSERT(function.HasCode());
635 } 636 }
636 } 637 }
637 } 638 }
638 } 639 }
639 } 640 }
640 641
641 } // namespace dart 642 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698