| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 if (RelocInfo::IsPosition(rmode)) { | 210 if (RelocInfo::IsPosition(rmode)) { |
| 211 if (RelocInfo::IsStatementPosition(rmode)) { | 211 if (RelocInfo::IsStatementPosition(rmode)) { |
| 212 out.AddFormatted(" ;; debug: statement %d", relocinfo.data()); | 212 out.AddFormatted(" ;; debug: statement %d", relocinfo.data()); |
| 213 } else { | 213 } else { |
| 214 out.AddFormatted(" ;; debug: position %d", relocinfo.data()); | 214 out.AddFormatted(" ;; debug: position %d", relocinfo.data()); |
| 215 } | 215 } |
| 216 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { | 216 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { |
| 217 HeapStringAllocator allocator; | 217 HeapStringAllocator allocator; |
| 218 StringStream accumulator(&allocator); | 218 StringStream accumulator(&allocator); |
| 219 relocinfo.target_object()->ShortPrint(&accumulator); | 219 relocinfo.target_object()->ShortPrint(&accumulator); |
| 220 SmartPointer<char> obj_name = accumulator.ToCString(); | 220 SmartPointer<const char> obj_name = accumulator.ToCString(); |
| 221 out.AddFormatted(" ;; object: %s", *obj_name); | 221 out.AddFormatted(" ;; object: %s", *obj_name); |
| 222 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { | 222 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
| 223 const char* reference_name = | 223 const char* reference_name = |
| 224 ref_encoder.NameOfAddress(*relocinfo.target_reference_address()); | 224 ref_encoder.NameOfAddress(*relocinfo.target_reference_address()); |
| 225 out.AddFormatted(" ;; external reference (%s)", reference_name); | 225 out.AddFormatted(" ;; external reference (%s)", reference_name); |
| 226 } else if (RelocInfo::IsCodeTarget(rmode)) { | 226 } else if (RelocInfo::IsCodeTarget(rmode)) { |
| 227 out.AddFormatted(" ;; code:"); | 227 out.AddFormatted(" ;; code:"); |
| 228 if (rmode == RelocInfo::CONSTRUCT_CALL) { | 228 if (rmode == RelocInfo::CONSTRUCT_CALL) { |
| 229 out.AddFormatted(" constructor,"); | 229 out.AddFormatted(" constructor,"); |
| 230 } | 230 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 300 |
| 301 #else // ENABLE_DISASSEMBLER | 301 #else // ENABLE_DISASSEMBLER |
| 302 | 302 |
| 303 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {} | 303 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {} |
| 304 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { return 0; } | 304 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { return 0; } |
| 305 void Disassembler::Decode(FILE* f, Code* code) {} | 305 void Disassembler::Decode(FILE* f, Code* code) {} |
| 306 | 306 |
| 307 #endif // ENABLE_DISASSEMBLER | 307 #endif // ENABLE_DISASSEMBLER |
| 308 | 308 |
| 309 } } // namespace v8::internal | 309 } } // namespace v8::internal |
| OLD | NEW |