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 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1844 UNREACHABLE(); | 1844 UNREACHABLE(); |
1845 } | 1845 } |
1846 ClassTable* class_table = isolate->class_table(); | 1846 ClassTable* class_table = isolate->class_table(); |
1847 if (space == Heap::kNew) { | 1847 if (space == Heap::kNew) { |
1848 class_table->UpdateAllocatedNew(cls_id, size); | 1848 class_table->UpdateAllocatedNew(cls_id, size); |
1849 } else { | 1849 } else { |
1850 class_table->UpdateAllocatedOld(cls_id, size); | 1850 class_table->UpdateAllocatedOld(cls_id, size); |
1851 } | 1851 } |
1852 const Class& cls = Class::Handle(class_table->At(cls_id)); | 1852 const Class& cls = Class::Handle(class_table->At(cls_id)); |
1853 if (cls.TraceAllocation(isolate)) { | 1853 if (cls.TraceAllocation(isolate)) { |
1854 Profiler::RecordAllocation(thread, cls_id); | 1854 Profiler::SampleAllocation(thread, cls_id); |
1855 } | 1855 } |
1856 NoSafepointScope no_safepoint; | 1856 NoSafepointScope no_safepoint; |
1857 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate())); | 1857 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate())); |
1858 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); | 1858 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); |
1859 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_)); | 1859 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_)); |
1860 return raw_obj; | 1860 return raw_obj; |
1861 } | 1861 } |
1862 | 1862 |
1863 | 1863 |
1864 class StoreBufferUpdateVisitor : public ObjectPointerVisitor { | 1864 class StoreBufferUpdateVisitor : public ObjectPointerVisitor { |
(...skipping 19917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21782 return tag_label.ToCString(); | 21782 return tag_label.ToCString(); |
21783 } | 21783 } |
21784 | 21784 |
21785 | 21785 |
21786 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21786 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
21787 Instance::PrintJSONImpl(stream, ref); | 21787 Instance::PrintJSONImpl(stream, ref); |
21788 } | 21788 } |
21789 | 21789 |
21790 | 21790 |
21791 } // namespace dart | 21791 } // namespace dart |
OLD | NEW |