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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 (rmode == RelocInfo::DEOPT_POSITION) { | 173 if (rmode == RelocInfo::DEOPT_POSITION) { |
174 out.AddFormatted(" ;; debug: deopt position '%d'", | 174 out.AddFormatted(" ;; debug: deopt position '%d'", |
175 static_cast<int>(relocinfo.data())); | 175 static_cast<int>(relocinfo.data())); |
176 } else if (rmode == RelocInfo::DEOPT_REASON) { | 176 } else if (rmode == RelocInfo::DEOPT_REASON) { |
177 Deoptimizer::DeoptReason reason = | 177 DeoptimizeReason reason = |
178 static_cast<Deoptimizer::DeoptReason>(relocinfo.data()); | 178 static_cast<DeoptimizeReason>(relocinfo.data()); |
179 out.AddFormatted(" ;; debug: deopt reason '%s'", | 179 out.AddFormatted(" ;; debug: deopt reason '%s'", |
180 Deoptimizer::GetDeoptReason(reason)); | 180 DeoptimizeReasonToString(reason)); |
181 } else if (rmode == RelocInfo::DEOPT_ID) { | 181 } else if (rmode == RelocInfo::DEOPT_ID) { |
182 out.AddFormatted(" ;; debug: deopt index %d", | 182 out.AddFormatted(" ;; debug: deopt index %d", |
183 static_cast<int>(relocinfo.data())); | 183 static_cast<int>(relocinfo.data())); |
184 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { | 184 } else if (rmode == RelocInfo::EMBEDDED_OBJECT) { |
185 HeapStringAllocator allocator; | 185 HeapStringAllocator allocator; |
186 StringStream accumulator(&allocator); | 186 StringStream accumulator(&allocator); |
187 relocinfo.target_object()->ShortPrint(&accumulator); | 187 relocinfo.target_object()->ShortPrint(&accumulator); |
188 base::SmartArrayPointer<const char> obj_name = accumulator.ToCString(); | 188 base::SmartArrayPointer<const char> obj_name = accumulator.ToCString(); |
189 out.AddFormatted(" ;; object: %s", obj_name.get()); | 189 out.AddFormatted(" ;; object: %s", obj_name.get()); |
190 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { | 190 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 280 |
281 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 281 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
282 byte* end, Code* code) { | 282 byte* end, Code* code) { |
283 return 0; | 283 return 0; |
284 } | 284 } |
285 | 285 |
286 #endif // ENABLE_DISASSEMBLER | 286 #endif // ENABLE_DISASSEMBLER |
287 | 287 |
288 } // namespace internal | 288 } // namespace internal |
289 } // namespace v8 | 289 } // namespace v8 |
OLD | NEW |