| OLD | NEW | 
|---|
| 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 RUNTIME_VM_DISASSEMBLER_H_ | 5 #ifndef RUNTIME_VM_DISASSEMBLER_H_ | 
| 6 #define RUNTIME_VM_DISASSEMBLER_H_ | 6 #define RUNTIME_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" | 
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 92                           DisassemblyFormatter* formatter, | 92                           DisassemblyFormatter* formatter, | 
| 93                           const Code& code); | 93                           const Code& code); | 
| 94 | 94 | 
| 95   static void Disassemble(uword start, | 95   static void Disassemble(uword start, | 
| 96                           uword end, | 96                           uword end, | 
| 97                           DisassemblyFormatter* formatter) { | 97                           DisassemblyFormatter* formatter) { | 
| 98     Disassemble(start, end, formatter, Code::Handle()); | 98     Disassemble(start, end, formatter, Code::Handle()); | 
| 99   } | 99   } | 
| 100 | 100 | 
| 101   static void Disassemble(uword start, uword end, const Code& code) { | 101   static void Disassemble(uword start, uword end, const Code& code) { | 
| 102 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) | 102 #ifndef PRODUCT | 
| 103     DisassembleToStdout stdout_formatter; | 103     DisassembleToStdout stdout_formatter; | 
| 104     LogBlock lb; | 104     LogBlock lb; | 
| 105     Disassemble(start, end, &stdout_formatter, code); | 105     Disassemble(start, end, &stdout_formatter, code); | 
| 106 #else | 106 #else | 
| 107     UNREACHABLE(); | 107     UNREACHABLE(); | 
| 108 #endif | 108 #endif | 
| 109   } | 109   } | 
| 110 | 110 | 
| 111   static void Disassemble(uword start, uword end) { | 111   static void Disassemble(uword start, uword end) { | 
| 112 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) | 112 #ifndef PRODUCT | 
| 113     DisassembleToStdout stdout_formatter; | 113     DisassembleToStdout stdout_formatter; | 
| 114     LogBlock lb; | 114     LogBlock lb; | 
| 115     Disassemble(start, end, &stdout_formatter); | 115     Disassemble(start, end, &stdout_formatter); | 
| 116 #else | 116 #else | 
| 117     UNREACHABLE(); | 117     UNREACHABLE(); | 
| 118 #endif | 118 #endif | 
| 119   } | 119   } | 
| 120 | 120 | 
| 121   // Decodes one instruction. | 121   // Decodes one instruction. | 
| 122   // Writes a hexadecimal representation into the hex_buffer and a | 122   // Writes a hexadecimal representation into the hex_buffer and a | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 140                                     const Code& code, | 140                                     const Code& code, | 
| 141                                     bool optimized); | 141                                     bool optimized); | 
| 142 | 142 | 
| 143   static const int kHexadecimalBufferSize = 32; | 143   static const int kHexadecimalBufferSize = 32; | 
| 144   static const int kUserReadableBufferSize = 256; | 144   static const int kUserReadableBufferSize = 256; | 
| 145 }; | 145 }; | 
| 146 | 146 | 
| 147 }  // namespace dart | 147 }  // namespace dart | 
| 148 | 148 | 
| 149 #endif  // RUNTIME_VM_DISASSEMBLER_H_ | 149 #endif  // RUNTIME_VM_DISASSEMBLER_H_ | 
| OLD | NEW | 
|---|