* Convert a method into a string for error reporting. */
| 1247 | * Convert a method into a string for error reporting. |
| 1248 | */ |
| 1249 | const char *getMethodString(Method method) |
| 1250 | { |
| 1251 | switch (method) |
| 1252 | { |
| 1253 | case METHOD_BINARY: |
| 1254 | return "binary"; |
| 1255 | case METHOD_INSTRUCTION: |
| 1256 | return "instruction"; |
| 1257 | case METHOD_PATCH: |
| 1258 | return "patch"; |
| 1259 | case METHOD_TRAMPOLINE: |
| 1260 | return "trampoline"; |
| 1261 | case METHOD_EMIT: |
| 1262 | return "emit"; |
| 1263 | default: |
| 1264 | return "???"; |
| 1265 | } |
| 1266 | } |
| 1267 | |
| 1268 | /* |
| 1269 | * Parse a message from the given stream. |