| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #ifndef VM_VERIFIER_H_ | 5 #ifndef VM_VERIFIER_H_ | 
| 6 #define VM_VERIFIER_H_ | 6 #define VM_VERIFIER_H_ | 
| 7 | 7 | 
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" | 
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" | 
| 10 #include "vm/handles.h" | 10 #include "vm/handles.h" | 
| 11 #include "vm/visitor.h" | 11 #include "vm/visitor.h" | 
| 12 | 12 | 
| 13 namespace dart { | 13 namespace dart { | 
| 14 | 14 | 
| 15 DECLARE_FLAG(bool, verify_on_transition); |  | 
| 16 |  | 
| 17 #define VERIFY_ON_TRANSITION                                                   \ |  | 
| 18   if (FLAG_verify_on_transition) {                                             \ |  | 
| 19     VerifyPointersVisitor::VerifyPointers();                                   \ |  | 
| 20     Isolate::Current()->heap()->Verify();                                      \ |  | 
| 21   }                                                                            \ |  | 
| 22 |  | 
| 23 |  | 
| 24 // Forward declarations. | 15 // Forward declarations. | 
| 25 class Isolate; | 16 class Isolate; | 
| 26 class ObjectSet; | 17 class ObjectSet; | 
| 27 class RawObject; | 18 class RawObject; | 
| 28 | 19 | 
| 29 class VerifyObjectVisitor : public ObjectVisitor { | 20 class VerifyObjectVisitor : public ObjectVisitor { | 
| 30  public: | 21  public: | 
| 31   VerifyObjectVisitor(Isolate* isolate, ObjectSet* allocated_set) | 22   VerifyObjectVisitor(Isolate* isolate, ObjectSet* allocated_set) | 
| 32       : ObjectVisitor(isolate), | 23       : ObjectVisitor(isolate), | 
| 33         allocated_set_(allocated_set) { | 24         allocated_set_(allocated_set) { | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 72   ObjectPointerVisitor* visitor_; | 63   ObjectPointerVisitor* visitor_; | 
| 73 | 64 | 
| 74   ObjectSet* allocated_set; | 65   ObjectSet* allocated_set; | 
| 75 | 66 | 
| 76   DISALLOW_COPY_AND_ASSIGN(VerifyWeakPointersVisitor); | 67   DISALLOW_COPY_AND_ASSIGN(VerifyWeakPointersVisitor); | 
| 77 }; | 68 }; | 
| 78 | 69 | 
| 79 }  // namespace dart | 70 }  // namespace dart | 
| 80 | 71 | 
| 81 #endif  // VM_VERIFIER_H_ | 72 #endif  // VM_VERIFIER_H_ | 
| OLD | NEW | 
|---|