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
ded0a1ef
Commit
ded0a1ef
authored
Jan 03, 2014
by
Paul Sokolovsky
Browse files
Implement BUILD_SLICE opcode (2-arg version).
parent
1c6de11f
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/vm.c
View file @
ded0a1ef
...
...
@@ -410,6 +410,18 @@ bool mp_execute_byte_code_2(const byte **ip_in_out, mp_obj_t *fastn, mp_obj_t **
sp
++
;
break
;
case
MP_BC_BUILD_SLICE
:
DECODE_UINT
;
if
(
unum
==
2
)
{
obj2
=
POP
();
obj1
=
TOP
();
SET_TOP
(
mp_obj_new_slice
(
obj1
,
obj2
,
NULL
));
}
else
{
printf
(
"3-argument slice is not supported
\n
"
);
assert
(
0
);
}
break
;
case
MP_BC_UNPACK_SEQUENCE
:
DECODE_UINT
;
rt_unpack_sequence
(
sp
[
0
],
unum
,
sp
-
unum
+
1
);
...
...
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