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

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

Issue 908853005: Fix missing new lines in disassembly (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 | « no previous file | no next file » | 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 #include "vm/disassembler.h" 5 #include "vm/disassembler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/log.h" 10 #include "vm/log.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 33
34 void DisassembleToStdout::Print(const char* format, ...) { 34 void DisassembleToStdout::Print(const char* format, ...) {
35 va_list args; 35 va_list args;
36 36
37 va_start(args, format); 37 va_start(args, format);
38 intptr_t len = OS::VSNPrint(NULL, 0, format, args); 38 intptr_t len = OS::VSNPrint(NULL, 0, format, args);
39 va_end(args); 39 va_end(args);
40 40
41 char* p = reinterpret_cast<char*>(malloc(len+1)); 41 char* p = reinterpret_cast<char*>(malloc(len + 1));
42 va_start(args, format); 42 va_start(args, format);
43 OS::VSNPrint(p, len, format, args); 43 OS::VSNPrint(p, (len + 1), format, args);
44 va_end(args); 44 va_end(args);
45 45
46 ISL_Print("%s", p); 46 ISL_Print("%s", p);
47 free(p); 47 free(p);
48 } 48 }
49 49
50 50
51 void DisassembleToJSONStream::ConsumeInstruction(char* hex_buffer, 51 void DisassembleToJSONStream::ConsumeInstruction(char* hex_buffer,
52 intptr_t hex_size, 52 intptr_t hex_size,
53 char* human_buffer, 53 char* human_buffer,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 formatter->ConsumeInstruction(hex_buffer, 161 formatter->ConsumeInstruction(hex_buffer,
162 sizeof(hex_buffer), 162 sizeof(hex_buffer),
163 human_buffer, 163 human_buffer,
164 sizeof(human_buffer), 164 sizeof(human_buffer),
165 pc); 165 pc);
166 pc += instruction_length; 166 pc += instruction_length;
167 } 167 }
168 } 168 }
169 169
170 } // namespace dart 170 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698