aboutsummaryrefslogtreecommitdiff
path: root/py/showbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/showbc.c')
-rw-r--r--py/showbc.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/py/showbc.c b/py/showbc.c
index d154511dc..4d6527fae 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -36,10 +36,10 @@
#define printf(...) mp_printf(&mp_plat_print, __VA_ARGS__)
#define DECODE_UINT { \
- unum = 0; \
- do { \
- unum = (unum << 7) + (*ip & 0x7f); \
- } while ((*ip++ & 0x80) != 0); \
+ unum = 0; \
+ do { \
+ unum = (unum << 7) + (*ip & 0x7f); \
+ } while ((*ip++ & 0x80) != 0); \
}
#define DECODE_ULABEL do { unum = (ip[0] | (ip[1] << 8)); ip += 2; } while (0)
#define DECODE_SLABEL do { unum = (ip[0] | (ip[1] << 8)) - 0x8000; ip += 2; } while (0)
@@ -59,20 +59,20 @@
#else
#define DECODE_QSTR { \
- qst = 0; \
- do { \
- qst = (qst << 7) + (*ip & 0x7f); \
- } while ((*ip++ & 0x80) != 0); \
+ qst = 0; \
+ do { \
+ qst = (qst << 7) + (*ip & 0x7f); \
+ } while ((*ip++ & 0x80) != 0); \
}
#define DECODE_PTR do { \
- ip = (byte*)MP_ALIGN(ip, sizeof(void*)); \
- unum = (uintptr_t)*(void**)ip; \
- ip += sizeof(void*); \
+ ip = (byte *)MP_ALIGN(ip, sizeof(void *)); \
+ unum = (uintptr_t)*(void **)ip; \
+ ip += sizeof(void *); \
} while (0)
#define DECODE_OBJ do { \
- ip = (byte*)MP_ALIGN(ip, sizeof(mp_obj_t)); \
- unum = (mp_uint_t)*(mp_obj_t*)ip; \
- ip += sizeof(mp_obj_t); \
+ ip = (byte *)MP_ALIGN(ip, sizeof(mp_obj_t)); \
+ unum = (mp_uint_t)*(mp_obj_t *)ip; \
+ ip += sizeof(mp_obj_t); \
} while (0)
#endif
@@ -135,7 +135,7 @@ void mp_bytecode_print(const void *descr, const byte *ip, mp_uint_t len, const m
mp_int_t bc = 0;
mp_uint_t source_line = 1;
printf(" bc=" INT_FMT " line=" UINT_FMT "\n", bc, source_line);
- for (const byte* ci = code_info; *ci;) {
+ for (const byte *ci = code_info; *ci;) {
if ((ci[0] & 0x80) == 0) {
// 0b0LLBBBBB encoding
bc += ci[0] & 0x1f;
@@ -422,12 +422,12 @@ const byte *mp_bytecode_print_str(const byte *ip) {
printf("BUILD_SET " UINT_FMT, unum);
break;
-#if MICROPY_PY_BUILTINS_SLICE
+ #if MICROPY_PY_BUILTINS_SLICE
case MP_BC_BUILD_SLICE:
DECODE_UINT;
printf("BUILD_SLICE " UINT_FMT, unum);
break;
-#endif
+ #endif
case MP_BC_STORE_COMP:
DECODE_UINT;
@@ -446,25 +446,25 @@ const byte *mp_bytecode_print_str(const byte *ip) {
case MP_BC_MAKE_FUNCTION:
DECODE_PTR;
- printf("MAKE_FUNCTION %p", (void*)(uintptr_t)unum);
+ printf("MAKE_FUNCTION %p", (void *)(uintptr_t)unum);
break;
case MP_BC_MAKE_FUNCTION_DEFARGS:
DECODE_PTR;
- printf("MAKE_FUNCTION_DEFARGS %p", (void*)(uintptr_t)unum);
+ printf("MAKE_FUNCTION_DEFARGS %p", (void *)(uintptr_t)unum);
break;
case MP_BC_MAKE_CLOSURE: {
DECODE_PTR;
mp_uint_t n_closed_over = *ip++;
- printf("MAKE_CLOSURE %p " UINT_FMT, (void*)(uintptr_t)unum, n_closed_over);
+ printf("MAKE_CLOSURE %p " UINT_FMT, (void *)(uintptr_t)unum, n_closed_over);
break;
}
case MP_BC_MAKE_CLOSURE_DEFARGS: {
DECODE_PTR;
mp_uint_t n_closed_over = *ip++;
- printf("MAKE_CLOSURE_DEFARGS %p " UINT_FMT, (void*)(uintptr_t)unum, n_closed_over);
+ printf("MAKE_CLOSURE_DEFARGS %p " UINT_FMT, (void *)(uintptr_t)unum, n_closed_over);
break;
}