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 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1852 UNREACHABLE(); | 1852 UNREACHABLE(); |
1853 } | 1853 } |
1854 ClassTable* class_table = isolate->class_table(); | 1854 ClassTable* class_table = isolate->class_table(); |
1855 if (space == Heap::kNew) { | 1855 if (space == Heap::kNew) { |
1856 class_table->UpdateAllocatedNew(cls_id, size); | 1856 class_table->UpdateAllocatedNew(cls_id, size); |
1857 } else { | 1857 } else { |
1858 class_table->UpdateAllocatedOld(cls_id, size); | 1858 class_table->UpdateAllocatedOld(cls_id, size); |
1859 } | 1859 } |
1860 const Class& cls = Class::Handle(class_table->At(cls_id)); | 1860 const Class& cls = Class::Handle(class_table->At(cls_id)); |
1861 if (cls.TraceAllocation(isolate)) { | 1861 if (cls.TraceAllocation(isolate)) { |
1862 Profiler::RecordAllocation(thread, cls_id); | 1862 Profiler::SampleAllocation(thread, cls_id); |
1863 } | 1863 } |
1864 NoSafepointScope no_safepoint; | 1864 NoSafepointScope no_safepoint; |
1865 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate())); | 1865 InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate())); |
1866 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); | 1866 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); |
1867 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_)); | 1867 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_)); |
1868 return raw_obj; | 1868 return raw_obj; |
1869 } | 1869 } |
1870 | 1870 |
1871 | 1871 |
1872 class StoreBufferUpdateVisitor : public ObjectPointerVisitor { | 1872 class StoreBufferUpdateVisitor : public ObjectPointerVisitor { |
(...skipping 20073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21946 return tag_label.ToCString(); | 21946 return tag_label.ToCString(); |
21947 } | 21947 } |
21948 | 21948 |
21949 | 21949 |
21950 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21950 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
21951 Instance::PrintJSONImpl(stream, ref); | 21951 Instance::PrintJSONImpl(stream, ref); |
21952 } | 21952 } |
21953 | 21953 |
21954 | 21954 |
21955 } // namespace dart | 21955 } // namespace dart |
OLD | NEW |