OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/disassembler.h" | 5 #include "src/disassembler.h" |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 // Instruction address and instruction offset. | 149 // Instruction address and instruction offset. |
150 out.AddFormatted("%p %4d ", prev_pc, prev_pc - begin); | 150 out.AddFormatted("%p %4d ", prev_pc, prev_pc - begin); |
151 | 151 |
152 // Instruction. | 152 // Instruction. |
153 out.AddFormatted("%s", decode_buffer.start()); | 153 out.AddFormatted("%s", decode_buffer.start()); |
154 | 154 |
155 // Print all the reloc info for this instruction which are not comments. | 155 // Print all the reloc info for this instruction which are not comments. |
156 for (int i = 0; i < pcs.length(); i++) { | 156 for (int i = 0; i < pcs.length(); i++) { |
157 // Put together the reloc info | 157 // Put together the reloc info |
158 RelocInfo relocinfo(pcs[i], rmodes[i], datas[i], converter.code()); | 158 RelocInfo relocinfo(isolate, pcs[i], rmodes[i], datas[i], |
| 159 converter.code()); |
159 | 160 |
160 // Indent the printing of the reloc info. | 161 // Indent the printing of the reloc info. |
161 if (i == 0) { | 162 if (i == 0) { |
162 // The first reloc info is printed after the disassembled instruction. | 163 // The first reloc info is printed after the disassembled instruction. |
163 out.AddPadding(' ', kRelocInfoPosition - out.position()); | 164 out.AddPadding(' ', kRelocInfoPosition - out.position()); |
164 } else { | 165 } else { |
165 // Additional reloc infos are printed on separate lines. | 166 // Additional reloc infos are printed on separate lines. |
166 DumpBuffer(os, &out); | 167 DumpBuffer(os, &out); |
167 out.AddPadding(' ', kRelocInfoPosition); | 168 out.AddPadding(' ', kRelocInfoPosition); |
168 } | 169 } |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 284 |
284 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 285 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
285 byte* end, Code* code) { | 286 byte* end, Code* code) { |
286 return 0; | 287 return 0; |
287 } | 288 } |
288 | 289 |
289 #endif // ENABLE_DISASSEMBLER | 290 #endif // ENABLE_DISASSEMBLER |
290 | 291 |
291 } // namespace internal | 292 } // namespace internal |
292 } // namespace v8 | 293 } // namespace v8 |
OLD | NEW |