Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
30b42dd7
Commit
30b42dd7
authored
Jan 17, 2017
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py: Remove unused "use_stack" argument from for_iter_end emit function.
parent
088740ec
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
py/compile.c
+2
-2
2 additions, 2 deletions
py/compile.c
py/emit.h
+2
-2
2 additions, 2 deletions
py/emit.h
py/emitbc.c
+2
-2
2 additions, 2 deletions
py/emitbc.c
py/emitnative.c
+2
-2
2 additions, 2 deletions
py/emitnative.c
with
8 additions
and
8 deletions
py/compile.c
+
2
−
2
View file @
30b42dd7
...
@@ -1484,7 +1484,7 @@ STATIC void compile_for_stmt(compiler_t *comp, mp_parse_node_struct_t *pns) {
...
@@ -1484,7 +1484,7 @@ STATIC void compile_for_stmt(compiler_t *comp, mp_parse_node_struct_t *pns) {
EMIT_ARG
(
jump
,
continue_label
);
EMIT_ARG
(
jump
,
continue_label
);
}
}
EMIT_ARG
(
label_assign
,
pop_label
);
EMIT_ARG
(
label_assign
,
pop_label
);
EMIT
_ARG
(
for_iter_end
,
true
);
EMIT
(
for_iter_end
);
// break/continue apply to outer loop (if any) in the else block
// break/continue apply to outer loop (if any) in the else block
END_BREAK_CONTINUE_BLOCK
END_BREAK_CONTINUE_BLOCK
...
@@ -2906,7 +2906,7 @@ STATIC void compile_scope_comp_iter(compiler_t *comp, mp_parse_node_struct_t *pn
...
@@ -2906,7 +2906,7 @@ STATIC void compile_scope_comp_iter(compiler_t *comp, mp_parse_node_struct_t *pn
EMIT_ARG
(
jump
,
l_top
);
EMIT_ARG
(
jump
,
l_top
);
EMIT_ARG
(
label_assign
,
l_end
);
EMIT_ARG
(
label_assign
,
l_end
);
EMIT
_ARG
(
for_iter_end
,
true
);
EMIT
(
for_iter_end
);
}
}
STATIC
void
check_for_doc_string
(
compiler_t
*
comp
,
mp_parse_node_t
pn
)
{
STATIC
void
check_for_doc_string
(
compiler_t
*
comp
,
mp_parse_node_t
pn
)
{
...
...
This diff is collapsed.
Click to expand it.
py/emit.h
+
2
−
2
View file @
30b42dd7
...
@@ -112,7 +112,7 @@ typedef struct _emit_method_table_t {
...
@@ -112,7 +112,7 @@ typedef struct _emit_method_table_t {
void
(
*
end_finally
)(
emit_t
*
emit
);
void
(
*
end_finally
)(
emit_t
*
emit
);
void
(
*
get_iter
)(
emit_t
*
emit
,
bool
use_stack
);
void
(
*
get_iter
)(
emit_t
*
emit
,
bool
use_stack
);
void
(
*
for_iter
)(
emit_t
*
emit
,
mp_uint_t
label
);
void
(
*
for_iter
)(
emit_t
*
emit
,
mp_uint_t
label
);
void
(
*
for_iter_end
)(
emit_t
*
emit
,
bool
use_stack
);
void
(
*
for_iter_end
)(
emit_t
*
emit
);
void
(
*
pop_block
)(
emit_t
*
emit
);
void
(
*
pop_block
)(
emit_t
*
emit
);
void
(
*
pop_except
)(
emit_t
*
emit
);
void
(
*
pop_except
)(
emit_t
*
emit
);
void
(
*
unary_op
)(
emit_t
*
emit
,
mp_unary_op_t
op
);
void
(
*
unary_op
)(
emit_t
*
emit
,
mp_unary_op_t
op
);
...
@@ -230,7 +230,7 @@ void mp_emit_bc_setup_finally(emit_t *emit, mp_uint_t label);
...
@@ -230,7 +230,7 @@ void mp_emit_bc_setup_finally(emit_t *emit, mp_uint_t label);
void
mp_emit_bc_end_finally
(
emit_t
*
emit
);
void
mp_emit_bc_end_finally
(
emit_t
*
emit
);
void
mp_emit_bc_get_iter
(
emit_t
*
emit
,
bool
use_stack
);
void
mp_emit_bc_get_iter
(
emit_t
*
emit
,
bool
use_stack
);
void
mp_emit_bc_for_iter
(
emit_t
*
emit
,
mp_uint_t
label
);
void
mp_emit_bc_for_iter
(
emit_t
*
emit
,
mp_uint_t
label
);
void
mp_emit_bc_for_iter_end
(
emit_t
*
emit
,
bool
use_stack
);
void
mp_emit_bc_for_iter_end
(
emit_t
*
emit
);
void
mp_emit_bc_pop_block
(
emit_t
*
emit
);
void
mp_emit_bc_pop_block
(
emit_t
*
emit
);
void
mp_emit_bc_pop_except
(
emit_t
*
emit
);
void
mp_emit_bc_pop_except
(
emit_t
*
emit
);
void
mp_emit_bc_unary_op
(
emit_t
*
emit
,
mp_unary_op_t
op
);
void
mp_emit_bc_unary_op
(
emit_t
*
emit
,
mp_unary_op_t
op
);
...
...
This diff is collapsed.
Click to expand it.
py/emitbc.c
+
2
−
2
View file @
30b42dd7
...
@@ -787,8 +787,8 @@ void mp_emit_bc_for_iter(emit_t *emit, mp_uint_t label) {
...
@@ -787,8 +787,8 @@ void mp_emit_bc_for_iter(emit_t *emit, mp_uint_t label) {
emit_write_bytecode_byte_unsigned_label
(
emit
,
MP_BC_FOR_ITER
,
label
);
emit_write_bytecode_byte_unsigned_label
(
emit
,
MP_BC_FOR_ITER
,
label
);
}
}
void
mp_emit_bc_for_iter_end
(
emit_t
*
emit
,
bool
use_stack
)
{
void
mp_emit_bc_for_iter_end
(
emit_t
*
emit
)
{
emit_bc_pre
(
emit
,
-
(
use_stack
?
sizeof
(
mp_obj_iter_buf_t
)
/
sizeof
(
mp_obj_t
)
:
1
));
emit_bc_pre
(
emit
,
-
(
sizeof
(
mp_obj_iter_buf_t
)
/
sizeof
(
mp_obj_t
)));
}
}
void
mp_emit_bc_pop_block
(
emit_t
*
emit
)
{
void
mp_emit_bc_pop_block
(
emit_t
*
emit
)
{
...
...
This diff is collapsed.
Click to expand it.
py/emitnative.c
+
2
−
2
View file @
30b42dd7
...
@@ -1827,10 +1827,10 @@ STATIC void emit_native_for_iter(emit_t *emit, mp_uint_t label) {
...
@@ -1827,10 +1827,10 @@ STATIC void emit_native_for_iter(emit_t *emit, mp_uint_t label) {
emit_post_push_reg
(
emit
,
VTYPE_PYOBJ
,
REG_RET
);
emit_post_push_reg
(
emit
,
VTYPE_PYOBJ
,
REG_RET
);
}
}
STATIC
void
emit_native_for_iter_end
(
emit_t
*
emit
,
bool
use_stack
)
{
STATIC
void
emit_native_for_iter_end
(
emit_t
*
emit
)
{
// adjust stack counter (we get here from for_iter ending, which popped the value for us)
// adjust stack counter (we get here from for_iter ending, which popped the value for us)
emit_native_pre
(
emit
);
emit_native_pre
(
emit
);
adjust_stack
(
emit
,
-
(
use_stack
?
sizeof
(
mp_obj_iter_buf_t
)
/
sizeof
(
mp_obj_t
)
:
1
));
adjust_stack
(
emit
,
-
(
sizeof
(
mp_obj_iter_buf_t
)
/
sizeof
(
mp_obj_t
)));
emit_post
(
emit
);
emit_post
(
emit
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment