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 #include "vm/disassembler.h" | 5 #include "vm/disassembler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #include "vm/il_printer.h" | 9 #include "vm/il_printer.h" |
10 #include "vm/json_stream.h" | 10 #include "vm/json_stream.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 private: | 97 private: |
98 const uword addr_; | 98 const uword addr_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(FindAddrVisitor); | 100 DISALLOW_COPY_AND_ASSIGN(FindAddrVisitor); |
101 }; | 101 }; |
102 | 102 |
103 | 103 |
104 bool Disassembler::CanFindOldObject(uword addr) { | 104 bool Disassembler::CanFindOldObject(uword addr) { |
105 FindAddrVisitor visitor(addr); | 105 FindAddrVisitor visitor(addr); |
106 NoSafepointScope no_safepoint; | 106 NoSafepointScope no_safepoint; |
107 return Isolate::Current()->heap()->FindOldObject(&visitor) != Object::null(); | 107 return Dart::vm_isolate()->heap()->FindOldObject(&visitor) != Object::null() |
| 108 || Isolate::Current()->heap()->FindOldObject(&visitor) != Object::null(); |
108 } | 109 } |
109 | 110 |
110 | 111 |
111 void Disassembler::Disassemble(uword start, | 112 void Disassembler::Disassemble(uword start, |
112 uword end, | 113 uword end, |
113 DisassemblyFormatter* formatter, | 114 DisassemblyFormatter* formatter, |
114 const Code& code) { | 115 const Code& code) { |
115 const Code::Comments& comments = | 116 const Code::Comments& comments = |
116 code.IsNull() ? Code::Comments::New(0) : code.comments(); | 117 code.IsNull() ? Code::Comments::New(0) : code.comments(); |
117 ASSERT(formatter != NULL); | 118 ASSERT(formatter != NULL); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 formatter->ConsumeInstruction(hex_buffer, | 161 formatter->ConsumeInstruction(hex_buffer, |
161 sizeof(hex_buffer), | 162 sizeof(hex_buffer), |
162 human_buffer, | 163 human_buffer, |
163 sizeof(human_buffer), | 164 sizeof(human_buffer), |
164 pc); | 165 pc); |
165 pc += instruction_length; | 166 pc += instruction_length; |
166 } | 167 } |
167 } | 168 } |
168 | 169 |
169 } // namespace dart | 170 } // namespace dart |
OLD | NEW |