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
780e54cd
Commit
780e54cd
authored
Jun 22, 2014
by
Damien George
Browse files
py: Implement delete_attr in native emitter.
parent
720f55cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/emitnative.c
View file @
780e54cd
...
...
@@ -917,8 +917,11 @@ STATIC void emit_native_delete_global(emit_t *emit, qstr qstr) {
}
STATIC
void
emit_native_delete_attr
(
emit_t
*
emit
,
qstr
qstr
)
{
// not supported
assert
(
0
);
vtype_kind_t
vtype_base
;
emit_pre_pop_reg
(
emit
,
&
vtype_base
,
REG_ARG_1
);
// arg1 = base
assert
(
vtype_base
==
VTYPE_PYOBJ
);
emit_call_with_2_imm_args
(
emit
,
MP_F_STORE_ATTR
,
mp_store_attr
,
qstr
,
REG_ARG_2
,
(
machine_uint_t
)
MP_OBJ_NULL
,
REG_ARG_3
);
// arg2 = attribute name, arg3 = value (null for delete)
emit_post
(
emit
);
}
STATIC
void
emit_native_delete_subscr
(
emit_t
*
emit
)
{
...
...
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