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_POSITION) { |
174 if (RelocInfo::IsStatementPosition(rmode)) { | 174 out.AddFormatted(" ;; debug: deopt position '%d'", |
175 out.AddFormatted(" ;; debug: statement %" V8PRIdPTR, | 175 static_cast<int>(relocinfo.data())); |
176 relocinfo.data()); | |
177 } else { | |
178 out.AddFormatted(" ;; debug: position %" V8PRIdPTR, | |
179 relocinfo.data()); | |
180 } | |
181 } else if (rmode == RelocInfo::DEOPT_REASON) { | 176 } else if (rmode == RelocInfo::DEOPT_REASON) { |
182 Deoptimizer::DeoptReason reason = | 177 Deoptimizer::DeoptReason reason = |
183 static_cast<Deoptimizer::DeoptReason>(relocinfo.data()); | 178 static_cast<Deoptimizer::DeoptReason>(relocinfo.data()); |
184 out.AddFormatted(" ;; debug: deopt reason '%s'", | 179 out.AddFormatted(" ;; debug: deopt reason '%s'", |
185 Deoptimizer::GetDeoptReason(reason)); | 180 Deoptimizer::GetDeoptReason(reason)); |
186 } else if (rmode == RelocInfo::DEOPT_ID) { | 181 } else if (rmode == RelocInfo::DEOPT_ID) { |
187 out.AddFormatted(" ;; debug: deopt index %d", | 182 out.AddFormatted(" ;; debug: deopt index %d", |
188 static_cast<int>(relocinfo.data())); | 183 static_cast<int>(relocinfo.data())); |
189 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { | 184 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { |
190 HeapStringAllocator allocator; | 185 HeapStringAllocator allocator; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 280 |
286 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 281 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
287 byte* end, Code* code) { | 282 byte* end, Code* code) { |
288 return 0; | 283 return 0; |
289 } | 284 } |
290 | 285 |
291 #endif // ENABLE_DISASSEMBLER | 286 #endif // ENABLE_DISASSEMBLER |
292 | 287 |
293 } // namespace internal | 288 } // namespace internal |
294 } // namespace v8 | 289 } // namespace v8 |
OLD | NEW |