| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_DBC. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. |
| 8 #if defined(TARGET_ARCH_DBC) | 8 #if defined(TARGET_ARCH_DBC) |
| 9 | 9 |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 Fmt op3) { | 188 Fmt op3) { |
| 189 const int32_t a = (op >> 8) & 0xFF; | 189 const int32_t a = (op >> 8) & 0xFF; |
| 190 const int32_t b = (op >> 16) & 0xFF; | 190 const int32_t b = (op >> 16) & 0xFF; |
| 191 const int32_t c = (op >> 24) & 0xFF; | 191 const int32_t c = (op >> 24) & 0xFF; |
| 192 Apply(&buf, &size, pc, op1, a, ", "); | 192 Apply(&buf, &size, pc, op1, a, ", "); |
| 193 Apply(&buf, &size, pc, op2, b, ", "); | 193 Apply(&buf, &size, pc, op2, b, ", "); |
| 194 Apply(&buf, &size, pc, op3, c, ""); | 194 Apply(&buf, &size, pc, op3, c, ""); |
| 195 } | 195 } |
| 196 | 196 |
| 197 | 197 |
| 198 #define BYTECODE_FORMATTER(name, encoding, op1, op2, op3) \ | 198 #define BYTECODE_FORMATTER(name, encoding, op1, op2, op3) \ |
| 199 static void Format##name(char* buf, intptr_t size, uword pc, uint32_t op) { \ | 199 static void Format##name(char* buf, intptr_t size, uword pc, uint32_t op) { \ |
| 200 Format##encoding(buf, size, pc, op, Fmt##op1, Fmt##op2, Fmt##op3); \ | 200 Format##encoding(buf, size, pc, op, Fmt##op1, Fmt##op2, Fmt##op3); \ |
| 201 } | 201 } |
| 202 BYTECODES_LIST(BYTECODE_FORMATTER) | 202 BYTECODES_LIST(BYTECODE_FORMATTER) |
| 203 #undef BYTECODE_FORMATTER | 203 #undef BYTECODE_FORMATTER |
| 204 | 204 |
| 205 | 205 |
| 206 static const BytecodeFormatter kFormatters[] = { | 206 static const BytecodeFormatter kFormatters[] = { |
| 207 #define BYTECODE_FORMATTER(name, encoding, op1, op2, op3) &Format##name, | 207 #define BYTECODE_FORMATTER(name, encoding, op1, op2, op3) &Format##name, |
| 208 BYTECODES_LIST(BYTECODE_FORMATTER) | 208 BYTECODES_LIST(BYTECODE_FORMATTER) |
| 209 #undef BYTECODE_FORMATTER | 209 #undef BYTECODE_FORMATTER |
| 210 }; | 210 }; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 239 if (!DecodeLoadObjectFromPoolOrThread(pc, code, *object)) { | 239 if (!DecodeLoadObjectFromPoolOrThread(pc, code, *object)) { |
| 240 *object = NULL; | 240 *object = NULL; |
| 241 } | 241 } |
| 242 } | 242 } |
| 243 } | 243 } |
| 244 | 244 |
| 245 | 245 |
| 246 } // namespace dart | 246 } // namespace dart |
| 247 | 247 |
| 248 #endif // defined TARGET_ARCH_DBC | 248 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |