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/v8.h" | 5 #include "src/v8.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.h" | 9 #include "src/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 out.AddPadding(' ', kRelocInfoPosition); | 188 out.AddPadding(' ', kRelocInfoPosition); |
189 } | 189 } |
190 | 190 |
191 RelocInfo::Mode rmode = relocinfo.rmode(); | 191 RelocInfo::Mode rmode = relocinfo.rmode(); |
192 if (RelocInfo::IsPosition(rmode)) { | 192 if (RelocInfo::IsPosition(rmode)) { |
193 if (RelocInfo::IsStatementPosition(rmode)) { | 193 if (RelocInfo::IsStatementPosition(rmode)) { |
194 out.AddFormatted(" ;; debug: statement %d", relocinfo.data()); | 194 out.AddFormatted(" ;; debug: statement %d", relocinfo.data()); |
195 } else { | 195 } else { |
196 out.AddFormatted(" ;; debug: position %d", relocinfo.data()); | 196 out.AddFormatted(" ;; debug: position %d", relocinfo.data()); |
197 } | 197 } |
| 198 } else if (rmode == RelocInfo::DEOPT_REASON) { |
| 199 Deoptimizer::DeoptReason reason = |
| 200 static_cast<Deoptimizer::DeoptReason>(relocinfo.data()); |
| 201 out.AddFormatted(" ;; debug: deopt reason '%s'", |
| 202 Deoptimizer::GetDeoptReason(reason)); |
198 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { | 203 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { |
199 HeapStringAllocator allocator; | 204 HeapStringAllocator allocator; |
200 StringStream accumulator(&allocator); | 205 StringStream accumulator(&allocator); |
201 relocinfo.target_object()->ShortPrint(&accumulator); | 206 relocinfo.target_object()->ShortPrint(&accumulator); |
202 SmartArrayPointer<const char> obj_name = accumulator.ToCString(); | 207 SmartArrayPointer<const char> obj_name = accumulator.ToCString(); |
203 out.AddFormatted(" ;; object: %s", obj_name.get()); | 208 out.AddFormatted(" ;; object: %s", obj_name.get()); |
204 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { | 209 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
205 const char* reference_name = | 210 const char* reference_name = |
206 ref_encoder.NameOfAddress(relocinfo.target_reference()); | 211 ref_encoder.NameOfAddress(relocinfo.target_reference()); |
207 out.AddFormatted(" ;; external reference (%s)", reference_name); | 212 out.AddFormatted(" ;; external reference (%s)", reference_name); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 #else // ENABLE_DISASSEMBLER | 311 #else // ENABLE_DISASSEMBLER |
307 | 312 |
308 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 313 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
309 byte* end, Code* code) { | 314 byte* end, Code* code) { |
310 return 0; | 315 return 0; |
311 } | 316 } |
312 | 317 |
313 #endif // ENABLE_DISASSEMBLER | 318 #endif // ENABLE_DISASSEMBLER |
314 | 319 |
315 } } // namespace v8::internal | 320 } } // namespace v8::internal |
OLD | NEW |