Chromium Code Reviews| 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 750 ASSERT(branch_offset_error_->IsLanguageError()); | 750 ASSERT(branch_offset_error_->IsLanguageError()); |
| 751 } | 751 } |
| 752 | 752 |
| 753 | 753 |
| 754 // An object visitor which will mark all visited objects. This is used to | 754 // An object visitor which will mark all visited objects. This is used to |
| 755 // premark all objects in the vm_isolate_ heap. | 755 // premark all objects in the vm_isolate_ heap. |
| 756 class PremarkingVisitor : public ObjectVisitor { | 756 class PremarkingVisitor : public ObjectVisitor { |
| 757 public: | 757 public: |
| 758 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {} | 758 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {} |
| 759 | 759 |
| 760 void VisitObject(RawObject* obj) { | 760 void VisitObject(RawObject* obj) { |
|
Ivan Posva
2015/04/15 21:57:01
Another question could be: Why are we visiting fre
| |
| 761 // RawInstruction objects are premarked on allocation. | 761 ASSERT(!obj->IsMarked()); |
| 762 if (!obj->IsMarked()) { | 762 // Free list elements should never be marked. |
| 763 if (!obj->IsFreeListElement()) { | |
| 763 obj->SetMarkBitUnsynchronized(); | 764 obj->SetMarkBitUnsynchronized(); |
| 764 } | 765 } |
| 765 } | 766 } |
| 766 }; | 767 }; |
| 767 | 768 |
| 768 | 769 |
| 769 #define SET_CLASS_NAME(class_name, name) \ | 770 #define SET_CLASS_NAME(class_name, name) \ |
| 770 cls = class_name##_class(); \ | 771 cls = class_name##_class(); \ |
| 771 cls.set_name(Symbols::name()); \ | 772 cls.set_name(Symbols::name()); \ |
| 772 | 773 |
| (...skipping 19880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 20653 return tag_label.ToCString(); | 20654 return tag_label.ToCString(); |
| 20654 } | 20655 } |
| 20655 | 20656 |
| 20656 | 20657 |
| 20657 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20658 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 20658 Instance::PrintJSONImpl(stream, ref); | 20659 Instance::PrintJSONImpl(stream, ref); |
| 20659 } | 20660 } |
| 20660 | 20661 |
| 20661 | 20662 |
| 20662 } // namespace dart | 20663 } // namespace dart |
| OLD | NEW |