OLD | NEW |
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Uses default NameConverter. | 52 // Uses default NameConverter. |
53 Disassembler(); | 53 Disassembler(); |
54 | 54 |
55 // Caller deallocates converter. | 55 // Caller deallocates converter. |
56 explicit Disassembler(const NameConverter& converter); | 56 explicit Disassembler(const NameConverter& converter); |
57 | 57 |
58 virtual ~Disassembler(); | 58 virtual ~Disassembler(); |
59 | 59 |
60 // Writes one disassembled instruction into 'buffer' (0-terminated). | 60 // Writes one disassembled instruction into 'buffer' (0-terminated). |
61 // Returns the length of the disassembled machine instruction in bytes. | 61 // Returns the length of the disassembled machine instruction in bytes. |
62 int InstructionDecode(char* buffer, const int buffer_size, byte* instruction); | 62 int InstructionDecode(v8::internal::Vector<char> buffer, byte* instruction); |
63 | 63 |
64 // Returns -1 if instruction does not mark the beginning of a constant pool, | 64 // Returns -1 if instruction does not mark the beginning of a constant pool, |
65 // or the number of entries in the constant pool beginning here. | 65 // or the number of entries in the constant pool beginning here. |
66 int ConstantPoolSizeAt(byte* instruction); | 66 int ConstantPoolSizeAt(byte* instruction); |
67 | 67 |
68 // Write disassembly into specified file 'f' using specified NameConverter | 68 // Write disassembly into specified file 'f' using specified NameConverter |
69 // (see constructor). | 69 // (see constructor). |
70 static void Disassemble(FILE* f, byte* begin, byte* end); | 70 static void Disassemble(FILE* f, byte* begin, byte* end); |
71 private: | 71 private: |
72 const NameConverter& converter_; | 72 const NameConverter& converter_; |
73 }; | 73 }; |
74 | 74 |
75 } // namespace disasm | 75 } // namespace disasm |
76 | 76 |
77 #endif // V8_DISASM_H_ | 77 #endif // V8_DISASM_H_ |
OLD | NEW |