OLD | NEW |
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/code_patcher.h" | 7 #include "vm/code_patcher.h" |
8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
10 #include "vm/log.h" | 10 #include "vm/log.h" |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 } | 581 } |
582 } | 582 } |
583 } | 583 } |
584 | 584 |
585 | 585 |
586 void Precompiler::AddInstantiatedClass(const Class& cls) { | 586 void Precompiler::AddInstantiatedClass(const Class& cls) { |
587 if (cls.is_allocated()) return; | 587 if (cls.is_allocated()) return; |
588 | 588 |
589 class_count_++; | 589 class_count_++; |
590 cls.set_is_allocated(true); | 590 cls.set_is_allocated(true); |
| 591 cls.EnsureIsFinalized(T); |
591 changed_ = true; | 592 changed_ = true; |
592 | 593 |
593 if (FLAG_trace_precompiler) { | 594 if (FLAG_trace_precompiler) { |
594 THR_Print("Allocation %" Pd " %s\n", class_count_, cls.ToCString()); | 595 THR_Print("Allocation %" Pd " %s\n", class_count_, cls.ToCString()); |
595 } | 596 } |
596 | 597 |
597 const Class& superclass = Class::Handle(cls.SuperClass()); | 598 const Class& superclass = Class::Handle(cls.SuperClass()); |
598 if (!superclass.IsNull()) { | 599 if (!superclass.IsNull()) { |
599 AddInstantiatedClass(superclass); | 600 AddInstantiatedClass(superclass); |
600 } | 601 } |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 cls = it.GetNextClass(); | 950 cls = it.GetNextClass(); |
950 if (cls.IsDynamicClass()) { | 951 if (cls.IsDynamicClass()) { |
951 continue; // class 'dynamic' is in the read-only VM isolate. | 952 continue; // class 'dynamic' is in the read-only VM isolate. |
952 } | 953 } |
953 cls.set_is_allocated(false); | 954 cls.set_is_allocated(false); |
954 } | 955 } |
955 } | 956 } |
956 } | 957 } |
957 | 958 |
958 } // namespace dart | 959 } // namespace dart |
OLD | NEW |