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

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

Issue 1584443002: VM: Precompiled rodata snapshot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: compute string hash if necessary Created 4 years, 10 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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 // premark all objects in the vm_isolate_ heap. 905 // premark all objects in the vm_isolate_ heap.
906 class PremarkingVisitor : public ObjectVisitor { 906 class PremarkingVisitor : public ObjectVisitor {
907 public: 907 public:
908 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {} 908 explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {}
909 909
910 void VisitObject(RawObject* obj) { 910 void VisitObject(RawObject* obj) {
911 // Free list elements should never be marked. 911 // Free list elements should never be marked.
912 if (!obj->IsFreeListElement()) { 912 if (!obj->IsFreeListElement()) {
913 ASSERT(obj->IsVMHeapObject()); 913 ASSERT(obj->IsVMHeapObject());
914 if (obj->IsMarked()) { 914 if (obj->IsMarked()) {
915 // Precompiled instructions are loaded pre-marked. 915 // Precompiled objects are loaded pre-marked.
916 ASSERT(Dart::IsRunningPrecompiledCode()); 916 ASSERT(Dart::IsRunningPrecompiledCode());
917 ASSERT(obj->IsInstructions()); 917 ASSERT(obj->IsInstructions() ||
918 obj->IsPcDescriptors() ||
919 obj->IsStackmap() ||
920 obj->IsOneByteString());
918 } else { 921 } else {
919 obj->SetMarkBitUnsynchronized(); 922 obj->SetMarkBitUnsynchronized();
920 } 923 }
921 } 924 }
922 } 925 }
923 }; 926 };
924 927
925 928
926 #define SET_CLASS_NAME(class_name, name) \ 929 #define SET_CLASS_NAME(class_name, name) \
927 cls = class_name##_class(); \ 930 cls = class_name##_class(); \
(...skipping 20498 matching lines...) Expand 10 before | Expand all | Expand 10 after
21426 return UserTag::null(); 21429 return UserTag::null();
21427 } 21430 }
21428 21431
21429 21432
21430 const char* UserTag::ToCString() const { 21433 const char* UserTag::ToCString() const {
21431 const String& tag_label = String::Handle(label()); 21434 const String& tag_label = String::Handle(label());
21432 return tag_label.ToCString(); 21435 return tag_label.ToCString();
21433 } 21436 }
21434 21437
21435 } // namespace dart 21438 } // 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