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