Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: runtime/vm/object.cc

Issue 1336763002: Last snapshot bits to get working precompiled hello_world on x64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 } 825 }
826 826
827 827
828 // An object visitor which will mark all visited objects. This is used to 828 // An object visitor which will mark all visited objects. This is used to
829 // premark all objects in the vm_isolate_ heap. 829 // premark all objects in the vm_isolate_ heap.
830 class PremarkingVisitor : public ObjectVisitor { 830 class PremarkingVisitor : public ObjectVisitor {
831 public: 831 public:
832 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {} 832 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {}
833 833
834 void VisitObject(RawObject* obj) { 834 void VisitObject(RawObject* obj) {
835 ASSERT(!obj->IsMarked());
836 // Free list elements should never be marked. 835 // Free list elements should never be marked.
837 if (!obj->IsFreeListElement()) { 836 if (!obj->IsFreeListElement()) {
838 ASSERT(obj->IsVMHeapObject()); 837 ASSERT(obj->IsVMHeapObject());
839 obj->SetMarkBitUnsynchronized(); 838 if (obj->IsMarked()) {
839 // Precompiled instructions are loaded pre-marked.
840 ASSERT(Object::IsRunningPrecompiledCode());
siva 2015/09/15 23:22:01 Yes, here it would be ASSERT(Dart::IsRunningPrecom
rmacnak 2015/09/16 01:34:44 Done.
841 ASSERT(obj->IsInstructions());
842 } else {
843 obj->SetMarkBitUnsynchronized();
844 }
840 } 845 }
841 } 846 }
842 }; 847 };
843 848
844 849
845 #define SET_CLASS_NAME(class_name, name) \ 850 #define SET_CLASS_NAME(class_name, name) \
846 cls = class_name##_class(); \ 851 cls = class_name##_class(); \
847 cls.set_name(Symbols::name()); \ 852 cls.set_name(Symbols::name()); \
848 853
849 void Object::FinalizeVMIsolate(Isolate* isolate) { 854 void Object::FinalizeVMIsolate(Isolate* isolate) {
(...skipping 20584 matching lines...) Expand 10 before | Expand all | Expand 10 after
21434 return tag_label.ToCString(); 21439 return tag_label.ToCString();
21435 } 21440 }
21436 21441
21437 21442
21438 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21443 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21439 Instance::PrintJSONImpl(stream, ref); 21444 Instance::PrintJSONImpl(stream, ref);
21440 } 21445 }
21441 21446
21442 21447
21443 } // namespace dart 21448 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698