| 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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 // premark all objects in the vm_isolate_ heap. | 908 // premark all objects in the vm_isolate_ heap. |
| 909 class PremarkingVisitor : public ObjectVisitor { | 909 class PremarkingVisitor : public ObjectVisitor { |
| 910 public: | 910 public: |
| 911 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {} | 911 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {} |
| 912 | 912 |
| 913 void VisitObject(RawObject* obj) { | 913 void VisitObject(RawObject* obj) { |
| 914 // Free list elements should never be marked. | 914 // Free list elements should never be marked. |
| 915 if (!obj->IsFreeListElement()) { | 915 if (!obj->IsFreeListElement()) { |
| 916 ASSERT(obj->IsVMHeapObject()); | 916 ASSERT(obj->IsVMHeapObject()); |
| 917 if (obj->IsMarked()) { | 917 if (obj->IsMarked()) { |
| 918 // Precompiled instructions are loaded pre-marked. | 918 // Precompiled objects are loaded pre-marked. |
| 919 ASSERT(Dart::IsRunningPrecompiledCode()); | 919 ASSERT(Dart::IsRunningPrecompiledCode()); |
| 920 ASSERT(obj->IsInstructions()); | 920 ASSERT(obj->IsInstructions() || |
| 921 obj->IsPcDescriptors() || |
| 922 obj->IsStackmap() || |
| 923 obj->IsOneByteString()); |
| 921 } else { | 924 } else { |
| 922 obj->SetMarkBitUnsynchronized(); | 925 obj->SetMarkBitUnsynchronized(); |
| 923 } | 926 } |
| 924 } | 927 } |
| 925 } | 928 } |
| 926 }; | 929 }; |
| 927 | 930 |
| 928 | 931 |
| 929 #define SET_CLASS_NAME(class_name, name) \ | 932 #define SET_CLASS_NAME(class_name, name) \ |
| 930 cls = class_name##_class(); \ | 933 cls = class_name##_class(); \ |
| (...skipping 20561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21492 return UserTag::null(); | 21495 return UserTag::null(); |
| 21493 } | 21496 } |
| 21494 | 21497 |
| 21495 | 21498 |
| 21496 const char* UserTag::ToCString() const { | 21499 const char* UserTag::ToCString() const { |
| 21497 const String& tag_label = String::Handle(label()); | 21500 const String& tag_label = String::Handle(label()); |
| 21498 return tag_label.ToCString(); | 21501 return tag_label.ToCString(); |
| 21499 } | 21502 } |
| 21500 | 21503 |
| 21501 } // namespace dart | 21504 } // namespace dart |
| OLD | NEW |