Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/disasm.h

Issue 8939: Backport the changes from the readability. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/constants-arm.h ('k') | src/disasm-arm.cc » ('j') | src/v8.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual const char* NameOfXMMRegister(int reg) const; 42 virtual const char* NameOfXMMRegister(int reg) const;
43 virtual const char* NameOfAddress(byte* addr) const; 43 virtual const char* NameOfAddress(byte* addr) const;
44 virtual const char* NameOfConstant(byte* addr) const; 44 virtual const char* NameOfConstant(byte* addr) const;
45 virtual const char* NameInCode(byte* addr) const; 45 virtual const char* NameInCode(byte* addr) const;
46 }; 46 };
47 47
48 48
49 // A generic Disassembler interface 49 // A generic Disassembler interface
50 class Disassembler { 50 class Disassembler {
51 public: 51 public:
52 // Uses default NameConverter.
53 Disassembler();
54
55 // Caller deallocates converter. 52 // Caller deallocates converter.
56 explicit Disassembler(const NameConverter& converter); 53 explicit Disassembler(const NameConverter& converter);
57 54
58 virtual ~Disassembler(); 55 virtual ~Disassembler();
59 56
60 // Writes one disassembled instruction into 'buffer' (0-terminated). 57 // Writes one disassembled instruction into 'buffer' (0-terminated).
61 // Returns the length of the disassembled machine instruction in bytes. 58 // Returns the length of the disassembled machine instruction in bytes.
62 int InstructionDecode(v8::internal::Vector<char> buffer, byte* instruction); 59 int InstructionDecode(v8::internal::Vector<char> buffer, byte* instruction);
63 60
64 // Returns -1 if instruction does not mark the beginning of a constant pool, 61 // 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. 62 // or the number of entries in the constant pool beginning here.
66 int ConstantPoolSizeAt(byte* instruction); 63 int ConstantPoolSizeAt(byte* instruction);
67 64
68 // Write disassembly into specified file 'f' using specified NameConverter 65 // Write disassembly into specified file 'f' using specified NameConverter
69 // (see constructor). 66 // (see constructor).
70 static void Disassemble(FILE* f, byte* begin, byte* end); 67 static void Disassemble(FILE* f, byte* begin, byte* end);
71 private: 68 private:
72 const NameConverter& converter_; 69 const NameConverter& converter_;
70
71 DISALLOW_IMPLICIT_CONSTRUCTORS(Disassembler);
73 }; 72 };
74 73
75 } // namespace disasm 74 } // namespace disasm
76 75
77 #endif // V8_DISASM_H_ 76 #endif // V8_DISASM_H_
OLDNEW
« no previous file with comments | « src/constants-arm.h ('k') | src/disasm-arm.cc » ('j') | src/v8.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698