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
5388a3c2
Commit
5388a3c2
authored
Jan 10, 2014
by
Paul Sokolovsky
Browse files
Crude attempt to implement RAISE_VARARGS (with args=1 so far only).
parent
bab5cfb3
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/vm.c
View file @
5388a3c2
...
...
@@ -474,6 +474,13 @@ bool mp_execute_byte_code_2(const byte **ip_in_out, mp_obj_t *fastn, mp_obj_t **
assert
(
exc_sp
==
&
exc_stack
[
0
]
-
1
);
return
false
;
case
MP_BC_RAISE_VARARGS
:
unum
=
*
ip
++
;
assert
(
unum
==
1
);
obj1
=
POP
();
nlr_jump
(
obj1
);
return
false
;
case
MP_BC_YIELD_VALUE
:
nlr_pop
();
*
ip_in_out
=
ip
;
...
...
tests/basics/tests/try1.py
View file @
5388a3c2
...
...
@@ -4,3 +4,8 @@ try:
x
.
a
()
except
:
print
(
x
)
try
:
raise
IndexError
except
IndexError
:
print
(
"caught"
)
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