OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/globals.h" // Needed here to get TARGET_ARCH_ARM. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
8 #if defined(TARGET_ARCH_ARM) | 8 #if defined(TARGET_ARCH_ARM) |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 // Convenience functions. | 60 // Convenience functions. |
61 char* get_buffer() const { return buffer_; } | 61 char* get_buffer() const { return buffer_; } |
62 char* current_position_in_buffer() { return buffer_ + buffer_pos_; } | 62 char* current_position_in_buffer() { return buffer_ + buffer_pos_; } |
63 size_t remaining_size_in_buffer() { return buffer_size_ - buffer_pos_; } | 63 size_t remaining_size_in_buffer() { return buffer_size_ - buffer_pos_; } |
64 | 64 |
65 char* buffer_; // Decode instructions into this buffer. | 65 char* buffer_; // Decode instructions into this buffer. |
66 size_t buffer_size_; // The size of the character buffer. | 66 size_t buffer_size_; // The size of the character buffer. |
67 size_t buffer_pos_; // Current character position in buffer. | 67 size_t buffer_pos_; // Current character position in buffer. |
68 | 68 |
| 69 DISALLOW_ALLOCATION(); |
69 DISALLOW_COPY_AND_ASSIGN(ARMDecoder); | 70 DISALLOW_COPY_AND_ASSIGN(ARMDecoder); |
70 }; | 71 }; |
71 | 72 |
72 | 73 |
73 // Support for assertions in the ARMDecoder formatting functions. | 74 // Support for assertions in the ARMDecoder formatting functions. |
74 #define STRING_STARTS_WITH(string, compare_string) \ | 75 #define STRING_STARTS_WITH(string, compare_string) \ |
75 (strncmp(string, compare_string, strlen(compare_string)) == 0) | 76 (strncmp(string, compare_string, strlen(compare_string)) == 0) |
76 | 77 |
77 | 78 |
78 // Append the str to the output buffer. | 79 // Append the str to the output buffer. |
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 human_buffer, | 1297 human_buffer, |
1297 sizeof(human_buffer), | 1298 sizeof(human_buffer), |
1298 pc); | 1299 pc); |
1299 pc += instruction_length; | 1300 pc += instruction_length; |
1300 } | 1301 } |
1301 } | 1302 } |
1302 | 1303 |
1303 } // namespace dart | 1304 } // namespace dart |
1304 | 1305 |
1305 #endif // defined TARGET_ARCH_ARM | 1306 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |