| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 2811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2822 return raw_ptr()->invocation_dispatcher_cache_; | 2822 return raw_ptr()->invocation_dispatcher_cache_; |
| 2823 } | 2823 } |
| 2824 | 2824 |
| 2825 | 2825 |
| 2826 void Class::set_invocation_dispatcher_cache(const Array& cache) const { | 2826 void Class::set_invocation_dispatcher_cache(const Array& cache) const { |
| 2827 StorePointer(&raw_ptr()->invocation_dispatcher_cache_, cache.raw()); | 2827 StorePointer(&raw_ptr()->invocation_dispatcher_cache_, cache.raw()); |
| 2828 } | 2828 } |
| 2829 | 2829 |
| 2830 | 2830 |
| 2831 void Class::Finalize() const { | 2831 void Class::Finalize() const { |
| 2832 ASSERT(Thread::Current()->IsMutatorThread()); |
| 2832 // Even if all regular classes are prefinalized (precompilation), signature | 2833 // Even if all regular classes are prefinalized (precompilation), signature |
| 2833 // classes may be added later when we encounter local functions. | 2834 // classes may be added later when we encounter local functions. |
| 2834 ASSERT(IsSignatureClass() || !Isolate::Current()->all_classes_finalized()); | 2835 ASSERT(IsSignatureClass() || !Isolate::Current()->all_classes_finalized()); |
| 2835 ASSERT(!is_finalized()); | 2836 ASSERT(!is_finalized()); |
| 2836 // Prefinalized classes have a VM internal representation and no Dart fields. | 2837 // Prefinalized classes have a VM internal representation and no Dart fields. |
| 2837 // Their instance size is precomputed and field offsets are known. | 2838 // Their instance size is precomputed and field offsets are known. |
| 2838 if (!is_prefinalized()) { | 2839 if (!is_prefinalized()) { |
| 2839 // Compute offsets of instance fields and instance size. | 2840 // Compute offsets of instance fields and instance size. |
| 2840 CalculateFieldOffsets(); | 2841 CalculateFieldOffsets(); |
| 2841 } | 2842 } |
| (...skipping 19125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21967 return tag_label.ToCString(); | 21968 return tag_label.ToCString(); |
| 21968 } | 21969 } |
| 21969 | 21970 |
| 21970 | 21971 |
| 21971 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21972 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 21972 Instance::PrintJSONImpl(stream, ref); | 21973 Instance::PrintJSONImpl(stream, ref); |
| 21973 } | 21974 } |
| 21974 | 21975 |
| 21975 | 21976 |
| 21976 } // namespace dart | 21977 } // namespace dart |
| OLD | NEW |