| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 if (constants > 0) { | 93 if (constants > 0) { |
| 94 SNPrintF(decode_buffer, | 94 SNPrintF(decode_buffer, |
| 95 "%08x constant", | 95 "%08x constant", |
| 96 *reinterpret_cast<int32_t*>(pc)); | 96 *reinterpret_cast<int32_t*>(pc)); |
| 97 constants--; | 97 constants--; |
| 98 pc += 4; | 98 pc += 4; |
| 99 } else { | 99 } else { |
| 100 int num_const = d.ConstantPoolSizeAt(pc); | 100 int num_const = d.ConstantPoolSizeAt(pc); |
| 101 if (num_const >= 0) { | 101 if (num_const >= 0) { |
| 102 SNPrintF(decode_buffer, | 102 SNPrintF(decode_buffer, |
| 103 "%08x constant pool begin", | 103 "%08x constant pool begin (num_const = %d)", |
| 104 *reinterpret_cast<int32_t*>(pc)); | 104 *reinterpret_cast<int32_t*>(pc), num_const); |
| 105 constants = num_const; | 105 constants = num_const; |
| 106 pc += 4; | 106 pc += 4; |
| 107 } else if (it != NULL && !it->done() && it->rinfo()->pc() == pc && | 107 } else if (it != NULL && !it->done() && it->rinfo()->pc() == pc && |
| 108 it->rinfo()->rmode() == RelocInfo::INTERNAL_REFERENCE) { | 108 it->rinfo()->rmode() == RelocInfo::INTERNAL_REFERENCE) { |
| 109 // raw pointer embedded in code stream, e.g., jump table | 109 // raw pointer embedded in code stream, e.g., jump table |
| 110 byte* ptr = *reinterpret_cast<byte**>(pc); | 110 byte* ptr = *reinterpret_cast<byte**>(pc); |
| 111 SNPrintF(decode_buffer, | 111 SNPrintF(decode_buffer, |
| 112 "%08" V8PRIxPTR " jump table entry %4" V8PRIdPTR, | 112 "%08" V8PRIxPTR " jump table entry %4" V8PRIdPTR, |
| 113 reinterpret_cast<intptr_t>(ptr), | 113 reinterpret_cast<intptr_t>(ptr), |
| 114 ptr - begin); | 114 ptr - begin); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 291 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
| 292 byte* end, Code* code) { | 292 byte* end, Code* code) { |
| 293 return 0; | 293 return 0; |
| 294 } | 294 } |
| 295 | 295 |
| 296 #endif // ENABLE_DISASSEMBLER | 296 #endif // ENABLE_DISASSEMBLER |
| 297 | 297 |
| 298 } // namespace internal | 298 } // namespace internal |
| 299 } // namespace v8 | 299 } // namespace v8 |
| OLD | NEW |