Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
e24b5637
Commit
e24b5637
authored
Feb 01, 2014
by
Damien George
Browse files
py: Fix emitcpy so continue is compatible with CPython.
parent
cbddb279
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/emitcpy.c
View file @
e24b5637
...
@@ -456,18 +456,21 @@ static void emit_cpy_setup_loop(emit_t *emit, int label) {
...
@@ -456,18 +456,21 @@ static void emit_cpy_setup_loop(emit_t *emit, int label) {
}
}
}
}
static
void
emit_cpy_break_loop
(
emit_t
*
emit
,
int
label
)
{
static
void
emit_cpy_break_loop
(
emit_t
*
emit
,
int
label
,
int
except_depth
)
{
emit_pre
(
emit
,
0
,
1
);
emit_pre
(
emit
,
0
,
1
);
if
(
emit
->
pass
==
PASS_3
)
{
if
(
emit
->
pass
==
PASS_3
)
{
printf
(
"BREAK_LOOP
\n
"
);
// CPython doesn't have label
printf
(
"BREAK_LOOP
\n
"
);
//printf("BREAK_LOOP %d\n", emit->label_offsets[label]);
}
}
}
}
static
void
emit_cpy_continue_loop
(
emit_t
*
emit
,
int
label
)
{
static
void
emit_cpy_continue_loop
(
emit_t
*
emit
,
int
label
,
int
except_depth
)
{
emit_pre
(
emit
,
0
,
3
);
if
(
except_depth
==
0
)
{
if
(
emit
->
pass
==
PASS_3
)
{
emit_cpy_jump
(
emit
,
label
);
printf
(
"CONTINUE_LOOP %d
\n
"
,
emit
->
label_offsets
[
label
]);
}
else
{
emit_pre
(
emit
,
0
,
3
);
if
(
emit
->
pass
==
PASS_3
)
{
printf
(
"CONTINUE_LOOP %d
\n
"
,
emit
->
label_offsets
[
label
]);
}
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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