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

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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/pages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 Instance* Object::sentinel_ = NULL; 108 Instance* Object::sentinel_ = NULL;
109 Instance* Object::transition_sentinel_ = NULL; 109 Instance* Object::transition_sentinel_ = NULL;
110 Instance* Object::unknown_constant_ = NULL; 110 Instance* Object::unknown_constant_ = NULL;
111 Instance* Object::non_constant_ = NULL; 111 Instance* Object::non_constant_ = NULL;
112 Bool* Object::bool_true_ = NULL; 112 Bool* Object::bool_true_ = NULL;
113 Bool* Object::bool_false_ = NULL; 113 Bool* Object::bool_false_ = NULL;
114 Smi* Object::smi_illegal_cid_ = NULL; 114 Smi* Object::smi_illegal_cid_ = NULL;
115 LanguageError* Object::snapshot_writer_error_ = NULL; 115 LanguageError* Object::snapshot_writer_error_ = NULL;
116 LanguageError* Object::branch_offset_error_ = NULL; 116 LanguageError* Object::branch_offset_error_ = NULL;
117 Array* Object::vm_isolate_snapshot_object_table_ = NULL; 117 Array* Object::vm_isolate_snapshot_object_table_ = NULL;
118 const uint8_t* Object::instructions_snapshot_buffer_ = NULL;
119 118
120 RawObject* Object::null_ = reinterpret_cast<RawObject*>(RAW_NULL); 119 RawObject* Object::null_ = reinterpret_cast<RawObject*>(RAW_NULL);
121 RawClass* Object::class_class_ = reinterpret_cast<RawClass*>(RAW_NULL); 120 RawClass* Object::class_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
122 RawClass* Object::dynamic_class_ = reinterpret_cast<RawClass*>(RAW_NULL); 121 RawClass* Object::dynamic_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
123 RawClass* Object::void_class_ = reinterpret_cast<RawClass*>(RAW_NULL); 122 RawClass* Object::void_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
124 RawType* Object::dynamic_type_ = reinterpret_cast<RawType*>(RAW_NULL); 123 RawType* Object::dynamic_type_ = reinterpret_cast<RawType*>(RAW_NULL);
125 RawType* Object::void_type_ = reinterpret_cast<RawType*>(RAW_NULL); 124 RawType* Object::void_type_ = reinterpret_cast<RawType*>(RAW_NULL);
126 RawClass* Object::unresolved_class_class_ = 125 RawClass* Object::unresolved_class_class_ =
127 reinterpret_cast<RawClass*>(RAW_NULL); 126 reinterpret_cast<RawClass*>(RAW_NULL);
128 RawClass* Object::type_arguments_class_ = reinterpret_cast<RawClass*>(RAW_NULL); 127 RawClass* Object::type_arguments_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 } 824 }
826 825
827 826
828 // An object visitor which will mark all visited objects. This is used to 827 // An object visitor which will mark all visited objects. This is used to
829 // premark all objects in the vm_isolate_ heap. 828 // premark all objects in the vm_isolate_ heap.
830 class PremarkingVisitor : public ObjectVisitor { 829 class PremarkingVisitor : public ObjectVisitor {
831 public: 830 public:
832 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {} 831 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {}
833 832
834 void VisitObject(RawObject* obj) { 833 void VisitObject(RawObject* obj) {
835 ASSERT(!obj->IsMarked());
836 // Free list elements should never be marked. 834 // Free list elements should never be marked.
837 if (!obj->IsFreeListElement()) { 835 if (!obj->IsFreeListElement()) {
838 ASSERT(obj->IsVMHeapObject()); 836 ASSERT(obj->IsVMHeapObject());
839 obj->SetMarkBitUnsynchronized(); 837 if (obj->IsMarked()) {
838 // Precompiled instructions are loaded pre-marked.
839 ASSERT(Dart::IsRunningPrecompiledCode());
840 ASSERT(obj->IsInstructions());
841 } else {
842 obj->SetMarkBitUnsynchronized();
843 }
840 } 844 }
841 } 845 }
842 }; 846 };
843 847
844 848
845 #define SET_CLASS_NAME(class_name, name) \ 849 #define SET_CLASS_NAME(class_name, name) \
846 cls = class_name##_class(); \ 850 cls = class_name##_class(); \
847 cls.set_name(Symbols::name()); \ 851 cls.set_name(Symbols::name()); \
848 852
849 void Object::FinalizeVMIsolate(Isolate* isolate) { 853 void Object::FinalizeVMIsolate(Isolate* isolate) {
(...skipping 20586 matching lines...) Expand 10 before | Expand all | Expand 10 after
21436 return tag_label.ToCString(); 21440 return tag_label.ToCString();
21437 } 21441 }
21438 21442
21439 21443
21440 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21444 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21441 Instance::PrintJSONImpl(stream, ref); 21445 Instance::PrintJSONImpl(stream, ref);
21442 } 21446 }
21443 21447
21444 21448
21445 } // namespace dart 21449 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698