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
f51f22dd
Commit
f51f22dd
authored
8 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py/emitnative: Remove assert(0)'s or replace with mp_not_implemented.
parent
86e94230
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
py/emitnative.c
+9
-9
9 additions, 9 deletions
py/emitnative.c
with
9 additions
and
9 deletions
py/emitnative.c
+
9
−
9
View file @
f51f22dd
...
@@ -389,7 +389,7 @@ STATIC void emit_native_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scop
...
@@ -389,7 +389,7 @@ STATIC void emit_native_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scop
ASM_MOV_REG_TO_LOCAL
(
emit
->
as
,
REG_ARG_4
,
i
-
REG_LOCAL_NUM
);
ASM_MOV_REG_TO_LOCAL
(
emit
->
as
,
REG_ARG_4
,
i
-
REG_LOCAL_NUM
);
}
else
{
}
else
{
// TODO not implemented
// TODO not implemented
assert
(
0
);
mp_not_implemented
(
"more than 4 viper args"
);
}
}
}
}
#endif
#endif
...
@@ -977,9 +977,9 @@ STATIC void emit_native_load_const_tok(emit_t *emit, mp_token_kind_t tok) {
...
@@ -977,9 +977,9 @@ STATIC void emit_native_load_const_tok(emit_t *emit, mp_token_kind_t tok) {
case
MP_TOKEN_KW_NONE
:
vtype
=
VTYPE_PTR_NONE
;
val
=
0
;
break
;
case
MP_TOKEN_KW_NONE
:
vtype
=
VTYPE_PTR_NONE
;
val
=
0
;
break
;
case
MP_TOKEN_KW_FALSE
:
vtype
=
VTYPE_BOOL
;
val
=
0
;
break
;
case
MP_TOKEN_KW_FALSE
:
vtype
=
VTYPE_BOOL
;
val
=
0
;
break
;
case
MP_TOKEN_KW_TRUE
:
vtype
=
VTYPE_BOOL
;
val
=
1
;
break
;
case
MP_TOKEN_KW_TRUE
:
vtype
=
VTYPE_BOOL
;
val
=
1
;
break
;
no_other_choice1
:
default
:
case
MP_TOKEN_ELLIPSIS
:
vtype
=
VTYPE_PYOBJ
;
val
=
(
mp_uint_t
)
&
mp_const_ellipsis_obj
;
break
;
assert
(
tok
==
MP_TOKEN_ELLIPSIS
)
;
default:
assert
(
0
);
goto
no_other_choice1
;
// to help flow control analysis
vtype
=
VTYPE_PYOBJ
;
val
=
(
mp_uint_t
)
&
mp_const_ellipsis_obj
;
break
;
}
}
}
else
{
}
else
{
vtype
=
VTYPE_PYOBJ
;
vtype
=
VTYPE_PYOBJ
;
...
@@ -987,9 +987,9 @@ STATIC void emit_native_load_const_tok(emit_t *emit, mp_token_kind_t tok) {
...
@@ -987,9 +987,9 @@ STATIC void emit_native_load_const_tok(emit_t *emit, mp_token_kind_t tok) {
case
MP_TOKEN_KW_NONE
:
val
=
(
mp_uint_t
)
mp_const_none
;
break
;
case
MP_TOKEN_KW_NONE
:
val
=
(
mp_uint_t
)
mp_const_none
;
break
;
case
MP_TOKEN_KW_FALSE
:
val
=
(
mp_uint_t
)
mp_const_false
;
break
;
case
MP_TOKEN_KW_FALSE
:
val
=
(
mp_uint_t
)
mp_const_false
;
break
;
case
MP_TOKEN_KW_TRUE
:
val
=
(
mp_uint_t
)
mp_const_true
;
break
;
case
MP_TOKEN_KW_TRUE
:
val
=
(
mp_uint_t
)
mp_const_true
;
break
;
no_other_choice2
:
default
:
case
MP_TOKEN_ELLIPSIS
:
val
=
(
mp_uint_t
)
&
mp_const_ellipsis_obj
;
break
;
assert
(
tok
==
MP_TOKEN_ELLIPSIS
)
;
default:
assert
(
0
);
goto
no_other_choice2
;
// to help flow control analysis
val
=
(
mp_uint_t
)
&
mp_const_ellipsis_obj
;
break
;
}
}
}
}
emit_post_push_imm
(
emit
,
vtype
,
val
);
emit_post_push_imm
(
emit
,
vtype
,
val
);
...
@@ -2271,12 +2271,12 @@ STATIC void emit_native_raise_varargs(emit_t *emit, mp_uint_t n_args) {
...
@@ -2271,12 +2271,12 @@ STATIC void emit_native_raise_varargs(emit_t *emit, mp_uint_t n_args) {
STATIC
void
emit_native_yield_value
(
emit_t
*
emit
)
{
STATIC
void
emit_native_yield_value
(
emit_t
*
emit
)
{
// not supported (for now)
// not supported (for now)
(
void
)
emit
;
(
void
)
emit
;
assert
(
0
);
mp_not_implemented
(
"native yield"
);
}
}
STATIC
void
emit_native_yield_from
(
emit_t
*
emit
)
{
STATIC
void
emit_native_yield_from
(
emit_t
*
emit
)
{
// not supported (for now)
// not supported (for now)
(
void
)
emit
;
(
void
)
emit
;
assert
(
0
);
mp_not_implemented
(
"native yield from"
);
}
}
STATIC
void
emit_native_start_except_handler
(
emit_t
*
emit
)
{
STATIC
void
emit_native_start_except_handler
(
emit_t
*
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