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

Side by Side Diff: runtime/vm/disassembler.h

Issue 907093002: Port flow_graph*, disassembler to ISL_Print (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months 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 | « runtime/vm/compiler.cc ('k') | runtime/vm/disassembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_DISASSEMBLER_H_ 5 #ifndef VM_DISASSEMBLER_H_
6 #define VM_DISASSEMBLER_H_ 6 #define VM_DISASSEMBLER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
11 #include "vm/log.h"
11 12
12 namespace dart { 13 namespace dart {
13 14
14 // Froward declaration. 15 // Froward declaration.
15 class MemoryRegion; 16 class MemoryRegion;
16 class JSONArray; 17 class JSONArray;
17 18
18 // Disassembly formatter interface, which consumes the 19 // Disassembly formatter interface, which consumes the
19 // disassembled instructions in any desired form. 20 // disassembled instructions in any desired form.
20 class DisassemblyFormatter { 21 class DisassemblyFormatter {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 static void Disassemble(uword start, 92 static void Disassemble(uword start,
92 uword end, 93 uword end,
93 DisassemblyFormatter* formatter) { 94 DisassemblyFormatter* formatter) {
94 Disassemble(start, end, formatter, Code::Handle()); 95 Disassemble(start, end, formatter, Code::Handle());
95 } 96 }
96 97
97 static void Disassemble(uword start, 98 static void Disassemble(uword start,
98 uword end, 99 uword end,
99 const Code& code) { 100 const Code& code) {
100 DisassembleToStdout stdout_formatter; 101 DisassembleToStdout stdout_formatter;
102 LogBlock lb(Isolate::Current());
101 Disassemble(start, end, &stdout_formatter, code); 103 Disassemble(start, end, &stdout_formatter, code);
102 } 104 }
103 105
104 static void Disassemble(uword start, uword end) { 106 static void Disassemble(uword start, uword end) {
105 DisassembleToStdout stdout_formatter; 107 DisassembleToStdout stdout_formatter;
108 LogBlock lb(Isolate::Current());
106 Disassemble(start, end, &stdout_formatter); 109 Disassemble(start, end, &stdout_formatter);
107 } 110 }
108 111
109 // Disassemble instructions in a memory region. 112 // Disassemble instructions in a memory region.
110 static void DisassembleMemoryRegion(const MemoryRegion& instructions, 113 static void DisassembleMemoryRegion(const MemoryRegion& instructions,
111 DisassemblyFormatter* formatter) { 114 DisassemblyFormatter* formatter) {
112 uword start = instructions.start(); 115 uword start = instructions.start();
113 uword end = instructions.end(); 116 uword end = instructions.end();
114 Disassemble(start, end, formatter); 117 Disassemble(start, end, formatter);
115 } 118 }
(...skipping 15 matching lines...) Expand all
131 static bool CanFindOldObject(uword addr); 134 static bool CanFindOldObject(uword addr);
132 135
133 private: 136 private:
134 static const int kHexadecimalBufferSize = 32; 137 static const int kHexadecimalBufferSize = 32;
135 static const int kUserReadableBufferSize = 256; 138 static const int kUserReadableBufferSize = 256;
136 }; 139 };
137 140
138 } // namespace dart 141 } // namespace dart
139 142
140 #endif // VM_DISASSEMBLER_H_ 143 #endif // VM_DISASSEMBLER_H_
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698