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
e753d916
Commit
e753d916
authored
Apr 08, 2014
by
Damien George
Browse files
py: Raise exception for unimplemented byte codes.
parent
b7ffdcc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/vm.c
View file @
e753d916
...
...
@@ -639,8 +639,10 @@ unwind_jump:
obj1
=
TOP
();
SET_TOP
(
mp_obj_new_slice
(
obj1
,
obj2
,
NULL
));
}
else
{
printf
(
"3-argument slice is not supported
\n
"
);
assert
(
0
);
obj1
=
mp_obj_new_exception_msg
(
&
mp_type_NotImplementedError
,
"3-argument slice is not supported"
);
nlr_pop
();
fastn
[
0
]
=
obj1
;
return
MP_VM_RETURN_EXCEPTION
;
}
break
;
#endif
...
...
@@ -833,9 +835,10 @@ yield:
default:
printf
(
"code %p, byte code 0x%02x not implemented
\n
"
,
ip
,
op
);
assert
(
0
);
obj1
=
mp_obj_new_exception_msg
(
&
mp_type_NotImplementedError
,
"byte code not implemented"
);
nlr_pop
();
return
MP_VM_RETURN_NORMAL
;
fastn
[
0
]
=
obj1
;
return
MP_VM_RETURN_EXCEPTION
;
}
}
...
...
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