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

Side by Side Diff: vm/raw_object.cc

Issue 11722026: Do not emit pointer information for embedded singleton VM Isolate objects while generating code. Th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « vm/raw_object.h ('k') | vm/snapshot.cc » ('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/raw_object.h" 5 #include "vm/raw_object.h"
6 6
7 #include "vm/class_table.h" 7 #include "vm/class_table.h"
8 #include "vm/freelist.h" 8 #include "vm/freelist.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
11 #include "vm/visitor.h" 11 #include "vm/visitor.h"
12 12
13 13
14 namespace dart { 14 namespace dart {
15 15
16 bool RawObject::IsVMHeapObject() const {
17 // TODO(asiva): Need a better way to represent VM heap objects, for
18 // now we use the premarked property for identifying objects in the
19 // VM heap.
20 ASSERT(IsHeapObject());
21 ASSERT(!Isolate::Current()->heap()->gc_in_progress());
22 return IsMarked();
23 }
24
25
16 void RawObject::Validate(Isolate* isolate) const { 26 void RawObject::Validate(Isolate* isolate) const {
17 if (Object::null_class_ == reinterpret_cast<RawClass*>(kHeapObjectTag)) { 27 if (Object::null_class_ == reinterpret_cast<RawClass*>(kHeapObjectTag)) {
18 // Validation relies on properly initialized class classes. Skip if the 28 // Validation relies on properly initialized class classes. Skip if the
19 // VM is still being initialized. 29 // VM is still being initialized.
20 return; 30 return;
21 } 31 }
22 // All Smi values are valid. 32 // All Smi values are valid.
23 if (!IsHeapObject()) { 33 if (!IsHeapObject()) {
24 return; 34 return;
25 } 35 }
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 1006
997 intptr_t RawWeakProperty::VisitWeakPropertyPointers( 1007 intptr_t RawWeakProperty::VisitWeakPropertyPointers(
998 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) { 1008 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) {
999 // Make sure that we got here with the tagged pointer as this. 1009 // Make sure that we got here with the tagged pointer as this.
1000 ASSERT(raw_obj->IsHeapObject()); 1010 ASSERT(raw_obj->IsHeapObject());
1001 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 1011 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
1002 return WeakProperty::InstanceSize(); 1012 return WeakProperty::InstanceSize();
1003 } 1013 }
1004 1014
1005 } // namespace dart 1015 } // namespace dart
OLDNEW
« no previous file with comments | « vm/raw_object.h ('k') | vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698