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 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1847 UNREACHABLE(); | 1847 UNREACHABLE(); |
1848 } | 1848 } |
1849 ClassTable* class_table = isolate->class_table(); | 1849 ClassTable* class_table = isolate->class_table(); |
1850 if (space == Heap::kNew) { | 1850 if (space == Heap::kNew) { |
1851 class_table->UpdateAllocatedNew(cls_id, size); | 1851 class_table->UpdateAllocatedNew(cls_id, size); |
1852 } else { | 1852 } else { |
1853 class_table->UpdateAllocatedOld(cls_id, size); | 1853 class_table->UpdateAllocatedOld(cls_id, size); |
1854 } | 1854 } |
1855 const Class& cls = Class::Handle(class_table->At(cls_id)); | 1855 const Class& cls = Class::Handle(class_table->At(cls_id)); |
1856 if (cls.TraceAllocation(isolate)) { | 1856 if (cls.TraceAllocation(isolate)) { |
1857 Profiler::RecordAllocation(thread, cls_id); | 1857 Profiler::SampleAllocation(thread, cls_id); |
1858 } | 1858 } |
1859 NoSafepointScope no_safepoint; | 1859 NoSafepointScope no_safepoint; |
1860 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate())); | 1860 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate())); |
1861 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); | 1861 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); |
1862 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_)); | 1862 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_)); |
1863 return raw_obj; | 1863 return raw_obj; |
1864 } | 1864 } |
1865 | 1865 |
1866 | 1866 |
1867 class StoreBufferUpdateVisitor : public ObjectPointerVisitor { | 1867 class StoreBufferUpdateVisitor : public ObjectPointerVisitor { |
(...skipping 19959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21827 return tag_label.ToCString(); | 21827 return tag_label.ToCString(); |
21828 } | 21828 } |
21829 | 21829 |
21830 | 21830 |
21831 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21831 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
21832 Instance::PrintJSONImpl(stream, ref); | 21832 Instance::PrintJSONImpl(stream, ref); |
21833 } | 21833 } |
21834 | 21834 |
21835 | 21835 |
21836 } // namespace dart | 21836 } // namespace dart |
OLD | NEW |