Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
c8870b7c
Commit
c8870b7c
authored
Jun 18, 2015
by
Damien George
Browse files
py: Make showbc decode UNPACK_EX, and use correct range for unop/binop.
parent
b6a08208
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/showbc.c
View file @
c8870b7c
...
...
@@ -426,6 +426,11 @@ const byte *mp_bytecode_print_str(const byte *ip) {
printf
(
"UNPACK_SEQUENCE "
UINT_FMT
,
unum
);
break
;
case
MP_BC_UNPACK_EX
:
DECODE_UINT
;
printf
(
"UNPACK_EX "
UINT_FMT
,
unum
);
break
;
case
MP_BC_MAKE_FUNCTION
:
DECODE_PTR
;
printf
(
"MAKE_FUNCTION %p"
,
(
void
*
)
unum
);
...
...
@@ -508,9 +513,9 @@ const byte *mp_bytecode_print_str(const byte *ip) {
printf
(
"LOAD_FAST "
UINT_FMT
,
(
mp_uint_t
)
ip
[
-
1
]
-
MP_BC_LOAD_FAST_MULTI
);
}
else
if
(
ip
[
-
1
]
<
MP_BC_STORE_FAST_MULTI
+
16
)
{
printf
(
"STORE_FAST "
UINT_FMT
,
(
mp_uint_t
)
ip
[
-
1
]
-
MP_BC_STORE_FAST_MULTI
);
}
else
if
(
ip
[
-
1
]
<
MP_BC_UNARY_OP_MULTI
+
5
)
{
}
else
if
(
ip
[
-
1
]
<
MP_BC_UNARY_OP_MULTI
+
6
)
{
printf
(
"UNARY_OP "
UINT_FMT
,
(
mp_uint_t
)
ip
[
-
1
]
-
MP_BC_UNARY_OP_MULTI
);
}
else
if
(
ip
[
-
1
]
<
MP_BC_BINARY_OP_MULTI
+
3
5
)
{
}
else
if
(
ip
[
-
1
]
<
MP_BC_BINARY_OP_MULTI
+
3
6
)
{
mp_uint_t
op
=
ip
[
-
1
]
-
MP_BC_BINARY_OP_MULTI
;
printf
(
"BINARY_OP "
UINT_FMT
" %s"
,
op
,
qstr_str
(
mp_binary_op_method_name
[
op
]));
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment