| 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)); | |
| 203 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { | 198 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { |
| 204 HeapStringAllocator allocator; | 199 HeapStringAllocator allocator; |
| 205 StringStream accumulator(&allocator); | 200 StringStream accumulator(&allocator); |
| 206 relocinfo.target_object()->ShortPrint(&accumulator); | 201 relocinfo.target_object()->ShortPrint(&accumulator); |
| 207 SmartArrayPointer<const char> obj_name = accumulator.ToCString(); | 202 SmartArrayPointer<const char> obj_name = accumulator.ToCString(); |
| 208 out.AddFormatted(" ;; object: %s", obj_name.get()); | 203 out.AddFormatted(" ;; object: %s", obj_name.get()); |
| 209 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { | 204 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
| 210 const char* reference_name = | 205 const char* reference_name = |
| 211 ref_encoder.NameOfAddress(relocinfo.target_reference()); | 206 ref_encoder.NameOfAddress(relocinfo.target_reference()); |
| 212 out.AddFormatted(" ;; external reference (%s)", reference_name); | 207 out.AddFormatted(" ;; external reference (%s)", reference_name); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 #else // ENABLE_DISASSEMBLER | 306 #else // ENABLE_DISASSEMBLER |
| 312 | 307 |
| 313 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 308 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
| 314 byte* end, Code* code) { | 309 byte* end, Code* code) { |
| 315 return 0; | 310 return 0; |
| 316 } | 311 } |
| 317 | 312 |
| 318 #endif // ENABLE_DISASSEMBLER | 313 #endif // ENABLE_DISASSEMBLER |
| 319 | 314 |
| 320 } } // namespace v8::internal | 315 } } // namespace v8::internal |
| OLD | NEW |