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

Side by Side Diff: src/disassembler.cc

Issue 2732273003: Disentangle assembler from isolate. (Closed)
Patch Set: Address feedback. Created 3 years, 9 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
« no previous file with comments | « src/deoptimizer.cc ('k') | src/heap/incremental-marking.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 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 <memory> 7 #include <memory>
8 8
9 #include "src/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Instruction address and instruction offset. 153 // Instruction address and instruction offset.
154 out.AddFormatted("%p %4" V8PRIdPTRDIFF " ", static_cast<void*>(prev_pc), 154 out.AddFormatted("%p %4" V8PRIdPTRDIFF " ", static_cast<void*>(prev_pc),
155 prev_pc - begin); 155 prev_pc - begin);
156 156
157 // Instruction. 157 // Instruction.
158 out.AddFormatted("%s", decode_buffer.start()); 158 out.AddFormatted("%s", decode_buffer.start());
159 159
160 // Print all the reloc info for this instruction which are not comments. 160 // Print all the reloc info for this instruction which are not comments.
161 for (int i = 0; i < pcs.length(); i++) { 161 for (int i = 0; i < pcs.length(); i++) {
162 // Put together the reloc info 162 // Put together the reloc info
163 RelocInfo relocinfo(isolate, pcs[i], rmodes[i], datas[i], 163 RelocInfo relocinfo(pcs[i], rmodes[i], datas[i], converter.code());
164 converter.code());
165 164
166 // Indent the printing of the reloc info. 165 // Indent the printing of the reloc info.
167 if (i == 0) { 166 if (i == 0) {
168 // The first reloc info is printed after the disassembled instruction. 167 // The first reloc info is printed after the disassembled instruction.
169 out.AddPadding(' ', kRelocInfoPosition - out.position()); 168 out.AddPadding(' ', kRelocInfoPosition - out.position());
170 } else { 169 } else {
171 // Additional reloc infos are printed on separate lines. 170 // Additional reloc infos are printed on separate lines.
172 DumpBuffer(os, &out); 171 DumpBuffer(os, &out);
173 out.AddPadding(' ', kRelocInfoPosition); 172 out.AddPadding(' ', kRelocInfoPosition);
174 } 173 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 282
284 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, 283 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin,
285 byte* end, Code* code) { 284 byte* end, Code* code) {
286 return 0; 285 return 0;
287 } 286 }
288 287
289 #endif // ENABLE_DISASSEMBLER 288 #endif // ENABLE_DISASSEMBLER
290 289
291 } // namespace internal 290 } // namespace internal
292 } // namespace v8 291 } // namespace v8
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698