OLD | NEW |
---|---|
1 // Copyright (c) 2011, 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/verifier.h" | 5 #include "platform/assert.h" |
6 | |
7 #include "vm/assert.h" | |
8 #include "vm/dart.h" | 6 #include "vm/dart.h" |
9 #include "vm/dart_api_state.h" | 7 #include "vm/dart_api_state.h" |
10 #include "vm/freelist.h" | 8 #include "vm/freelist.h" |
11 #include "vm/heap.h" | 9 #include "vm/heap.h" |
12 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
13 #include "vm/object.h" | 11 #include "vm/object.h" |
14 #include "vm/raw_object.h" | 12 #include "vm/raw_object.h" |
15 #include "vm/stack_frame.h" | 13 #include "vm/stack_frame.h" |
14 #include "vm/verifier.h" | |
Ivan Posva
2012/01/13 23:22:06
First.
Søren Gjesse
2012/01/16 08:58:00
Done.
| |
16 | 15 |
17 namespace dart { | 16 namespace dart { |
18 | 17 |
19 DEFINE_FLAG(bool, verify_on_transition, false, "Verify on dart <==> VM."); | 18 DEFINE_FLAG(bool, verify_on_transition, false, "Verify on dart <==> VM."); |
20 | 19 |
21 | 20 |
22 void VerifyPointersVisitor::VisitPointers(RawObject** first, RawObject** last) { | 21 void VerifyPointersVisitor::VisitPointers(RawObject** first, RawObject** last) { |
23 for (RawObject** current = first; current <= last; current++) { | 22 for (RawObject** current = first; current <= last; current++) { |
24 RawObject* raw_obj = *current; | 23 RawObject* raw_obj = *current; |
25 if (raw_obj->IsHeapObject()) { | 24 if (raw_obj->IsHeapObject()) { |
(...skipping 25 matching lines...) Expand all Loading... | |
51 NoGCScope no_gc; | 50 NoGCScope no_gc; |
52 Isolate* isolate = Isolate::Current(); | 51 Isolate* isolate = Isolate::Current(); |
53 VerifyPointersVisitor visitor; | 52 VerifyPointersVisitor visitor; |
54 isolate->VisitObjectPointers(&visitor, | 53 isolate->VisitObjectPointers(&visitor, |
55 StackFrameIterator::kValidateFrames); | 54 StackFrameIterator::kValidateFrames); |
56 VerifyWeakPointersVisitor weak_visitor(&visitor); | 55 VerifyWeakPointersVisitor weak_visitor(&visitor); |
57 isolate->VisitWeakPersistentHandles(&weak_visitor); | 56 isolate->VisitWeakPersistentHandles(&weak_visitor); |
58 } | 57 } |
59 | 58 |
60 } // namespace dart | 59 } // namespace dart |
OLD | NEW |