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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 if (i == 0) { | 163 if (i == 0) { |
164 // The first reloc info is printed after the disassembled instruction. | 164 // The first reloc info is printed after the disassembled instruction. |
165 out.AddPadding(' ', kRelocInfoPosition - out.position()); | 165 out.AddPadding(' ', kRelocInfoPosition - out.position()); |
166 } else { | 166 } else { |
167 // Additional reloc infos are printed on separate lines. | 167 // Additional reloc infos are printed on separate lines. |
168 DumpBuffer(os, &out); | 168 DumpBuffer(os, &out); |
169 out.AddPadding(' ', kRelocInfoPosition); | 169 out.AddPadding(' ', kRelocInfoPosition); |
170 } | 170 } |
171 | 171 |
172 RelocInfo::Mode rmode = relocinfo.rmode(); | 172 RelocInfo::Mode rmode = relocinfo.rmode(); |
173 if (RelocInfo::IsPosition(rmode)) { | 173 if (rmode == RelocInfo::DEOPT_REASON) { |
Michael Starzinger
2016/06/29 12:17:50
nit: Would it make sense to keep printing DEOPT_PO
| |
174 if (RelocInfo::IsStatementPosition(rmode)) { | |
175 out.AddFormatted(" ;; debug: statement %" V8PRIdPTR, | |
176 relocinfo.data()); | |
177 } else { | |
178 out.AddFormatted(" ;; debug: position %" V8PRIdPTR, | |
179 relocinfo.data()); | |
180 } | |
181 } else if (rmode == RelocInfo::DEOPT_REASON) { | |
182 Deoptimizer::DeoptReason reason = | 174 Deoptimizer::DeoptReason reason = |
183 static_cast<Deoptimizer::DeoptReason>(relocinfo.data()); | 175 static_cast<Deoptimizer::DeoptReason>(relocinfo.data()); |
184 out.AddFormatted(" ;; debug: deopt reason '%s'", | 176 out.AddFormatted(" ;; debug: deopt reason '%s'", |
185 Deoptimizer::GetDeoptReason(reason)); | 177 Deoptimizer::GetDeoptReason(reason)); |
186 } else if (rmode == RelocInfo::DEOPT_ID) { | 178 } else if (rmode == RelocInfo::DEOPT_ID) { |
187 out.AddFormatted(" ;; debug: deopt index %d", | 179 out.AddFormatted(" ;; debug: deopt index %d", |
188 static_cast<int>(relocinfo.data())); | 180 static_cast<int>(relocinfo.data())); |
189 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { | 181 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { |
190 HeapStringAllocator allocator; | 182 HeapStringAllocator allocator; |
191 StringStream accumulator(&allocator); | 183 StringStream accumulator(&allocator); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
285 | 277 |
286 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 278 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
287 byte* end, Code* code) { | 279 byte* end, Code* code) { |
288 return 0; | 280 return 0; |
289 } | 281 } |
290 | 282 |
291 #endif // ENABLE_DISASSEMBLER | 283 #endif // ENABLE_DISASSEMBLER |
292 | 284 |
293 } // namespace internal | 285 } // namespace internal |
294 } // namespace v8 | 286 } // namespace v8 |
OLD | NEW |