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