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/instructions.h" | 10 #include "vm/instructions.h" |
11 #include "vm/json_stream.h" | 11 #include "vm/json_stream.h" |
12 #include "vm/log.h" | 12 #include "vm/log.h" |
13 #include "vm/os.h" | 13 #include "vm/os.h" |
14 #include "vm/code_patcher.h" | 14 #include "vm/code_patcher.h" |
15 | 15 |
16 | 16 |
17 namespace dart { | 17 namespace dart { |
18 | 18 |
| 19 #ifndef PRODUCT |
| 20 |
19 void DisassembleToStdout::ConsumeInstruction(const Code& code, | 21 void DisassembleToStdout::ConsumeInstruction(const Code& code, |
20 char* hex_buffer, | 22 char* hex_buffer, |
21 intptr_t hex_size, | 23 intptr_t hex_size, |
22 char* human_buffer, | 24 char* human_buffer, |
23 intptr_t human_size, | 25 intptr_t human_size, |
24 uword pc) { | 26 uword pc) { |
25 static const int kHexColumnWidth = 23; | 27 static const int kHexColumnWidth = 23; |
26 uint8_t* pc_ptr = reinterpret_cast<uint8_t*>(pc); | 28 uint8_t* pc_ptr = reinterpret_cast<uint8_t*>(pc); |
27 THR_Print("%p %s", pc_ptr, hex_buffer); | 29 THR_Print("%p %s", pc_ptr, hex_buffer); |
28 int hex_length = strlen(hex_buffer); | 30 int hex_length = strlen(hex_buffer); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 formatter->ConsumeInstruction(code, | 177 formatter->ConsumeInstruction(code, |
176 hex_buffer, | 178 hex_buffer, |
177 sizeof(hex_buffer), | 179 sizeof(hex_buffer), |
178 human_buffer, | 180 human_buffer, |
179 sizeof(human_buffer), | 181 sizeof(human_buffer), |
180 pc); | 182 pc); |
181 pc += instruction_length; | 183 pc += instruction_length; |
182 } | 184 } |
183 } | 185 } |
184 | 186 |
| 187 #endif // !PRODUCT |
| 188 |
185 } // namespace dart | 189 } // namespace dart |
OLD | NEW |